@Test
public void testZNodeDeletes() throws Exception {
ZooKeeperWrapper zkw =
ZooKeeperWrapper.createInstance(conf, TestZooKeeper.class.getName());
zkw.registerListener(EmptyWatcher.instance);
zkw.ensureExists("/l1/l2/l3/l4");
try {
zkw.deleteZNode("/l1/l2");
fail("We should not be able to delete if znode has childs");
} catch (KeeperException ex) {
assertNotNull(zkw.getData("/l1/l2/l3", "l4"));