if (!watcher.clientConnected.await(CONNECTION_TIMEOUT, TimeUnit.MILLISECONDS))
{
Assert.fail("Unable to connect to server");
}
try {
zk.create("/path1", null, Ids.CREATOR_ALL_ACL, CreateMode.PERSISTENT);
Assert.fail("Should have gotten exception.");
} catch (KeeperException e) {
// ok, exception as expected.
LOG.info("Got exception as expected: " + e);
}