System.out.printf("Count Down occurred. Time: %s%n",System.currentTimeMillis());
}
@Test(timeout = 5000l)
public void testMultipleCountDownsWork() throws Exception{
countDownLatch = LatchBuilder.newCountDownLatch(1, baseBarrierPath, new BaseZkSessionManager(zk));
assertEquals("The Initial count down latch does not have a count of zero!",0,countDownLatch.getCount());
countDownLatch.countDown();
assertEquals("The Initial count down latch does not have a count of one!",1,countDownLatch.getCount());
countDownLatch.await();
countDownLatch.closeLatch();
countDownLatch = LatchBuilder.newCountDownLatch(1, baseBarrierPath, new BaseZkSessionManager(zk));
assertEquals("The Initial count down latch does not have a count of zero!",0,countDownLatch.getCount());
countDownLatch.countDown();
assertEquals("The Initial count down latch does not have a count of one!",1,countDownLatch.getCount());
countDownLatch.await();
}