ZooKeeperService { synchronized public ZKClient createClient() throws IOException { if (!initialised) { throw new IOException("Not yet initialised!"); } return new ZKClient(clientAddr); }  synchronized boolean isInitialised(); static ZooKeeperService get(); synchronized static ZooKeeperService getAndInit(); synchronized static ZooKeeperService getAndInit(FlumeConfiguration cfg); synchronized ZKClient createClient(); synchronized void shutdown();  }
@Test(expected=IOException.class) public void testCreateClientFail() throws IOException { ZooKeeperService svc = new ZooKeeperService(); svc.createClient(); }