@Test
public void testZNodeDeletes() throws Exception {
ZooKeeperWrapper zkw = new ZooKeeperWrapper(conf, 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"));
}
zkw.deleteZNode("/l1/l2", true);