CuratorZookeeperClient extends AbstractZookeeperClient<CuratorWatcher> { @Override public void delete(String path) { try { client.delete().forPath(path); } catch (NoNodeException e) { } catch (Exception e) { throw new IllegalStateException(e.getMessage(), e); } } CuratorZookeeperClient(String serverAddr, String authority); @Override void createPersistent(String path); @Override void createEphemeral(String path); @Override void delete(String path); @Override List<String> getChildren(String path); @Override boolean checkExists(String path); @Override boolean isConnected(); @Override void doClose(); @Override CuratorWatcher createTargetChildListener(String path, ChildListener listener); @Override List<String> addTargetChildListener(String path, CuratorWatcher listener); @Override void removeTargetChildListener(String path, CuratorWatcher listener);  }
@Test(expected = IllegalStateException.class) public void testWithStoppedServer() throws IOException { curatorClient.create("/testPath", true); zkServer.stop(); curatorClient.delete("/testPath"); }