@Test
public void test_watch_when_create_path() throws InterruptedException {

    String path = "/dubbo/com.alibaba.dubbo.demo.DemoService/providers";
    String child = "/dubbo/com.alibaba.dubbo.demo.DemoService/providers/demoService1";
    final CountDownLatch notNotified = new CountDownLatch(1);
    ChildListener childListener = (parent, children) -> {
        Assertions.assertEquals(1, children.size());
        Assertions.assertEquals(child.substring(child.lastIndexOf("/") + 1), children.get(0));
        notNotified.countDown();
    };
    client.addChildListener(path, childListener);
    client.createEphemeral(child);
    Assertions.assertTrue(notNotified.await(10, TimeUnit.SECONDS));
    client.removeChildListener(path, childListener);
    client.delete(child);
}