b.testRegisterBookie(conf);
fail("Should throw NodeExistsException as the znode is not getting expired");
} catch (IOException e) {
Throwable t = e.getCause();
if (t instanceof KeeperException) {
KeeperException ke = (KeeperException) t;
Assert.assertTrue("ErrorCode:" + ke.code()
+ ", Registration node doesn't exists",
ke.code() == KeeperException.Code.NODEEXISTS);
// verify ephemeral owner of the bkReg znode
Stat bkRegNode2 = newzk.exists(bkRegPath, false);
Assert.assertNotNull("Bookie registration has been failed",
bkRegNode2);