@Test
public void testChildrenInitialized() throws Exception
{

    client.create().forPath("/test", "".getBytes());
    client.create().forPath("/test/1", "1".getBytes());
    client.create().forPath("/test/2", "2".getBytes());
    client.create().forPath("/test/3", "3".getBytes());
    cache = newTreeCacheWithListeners(client, "/test");
    cache.start();
    assertEvent(TreeCacheEvent.Type.NODE_ADDED, "/test");
    assertEvent(TreeCacheEvent.Type.NODE_ADDED, "/test/1");
    assertEvent(TreeCacheEvent.Type.NODE_ADDED, "/test/2");
    assertEvent(TreeCacheEvent.Type.NODE_ADDED, "/test/3");
    assertEvent(TreeCacheEvent.Type.INITIALIZED);
    assertNoMoreEvents();
}