@Test
    public void testConfigSubscriber() {
        ConfigSubscriber subscriber = new ConfigSubscriber();
        ConfigHandle<AppConfig> h = subscriber.subscribe(AppConfig.class, CONFIG_ID);
        assertNotNull(h);
        subscriber.nextConfig(false);
        assertNotNull(h.getConfig());
        assertEquals(AppConfig.CONFIG_DEF_NAME, ConfigInstance.getDefName(h.getConfig().getClass()));
        assertTrue(h.isChanged());
        assertTrue(h.toString().startsWith("Handle changed: true\nSub:\n"));
        subscriber.close();
        assertEquals(ConfigSubscriber.State.CLOSED, subscriber.state());
    }
Tests ConfigSubscriber API, and the ConfigHandle class.

@author Harald Musum
config/src/test/java/com/yahoo/config/subscription/ConfigApiTest.java