@Test
    public void testGetConfig() {
        int times = 11;
        String message = "testGetConfig";
        String a0 = "a0";
        String configId = "raw:times " + times + "\nmessage " + message + "\na[1]\na[0].name " + a0;

        ConfigGetter<AppConfig> getter = new ConfigGetter<>(AppConfig.class);
        AppConfig config = getter.getConfig(configId);
        assertEquals(times, config.times());
        assertEquals(message, config.message());
        assertEquals(1, config.a().size());
        assertEquals(a0, config.a(0).name());

        AppService service = new AppService(configId, sourceSet);
        AppConfig serviceConfig = service.getConfig();
        assertTrue(service.isConfigured());
        assertEquals(config, serviceConfig);

        service.cancelSubscription();
    }
Unit test for the {@link ConfigGetter}.

@author gjoranv
config/src/test/java/com/yahoo/config/subscription/ConfigGetterTest.java