247248249250251252253254255256257
for (int i = 0 ; i < 5; i++) { latch.countDown(); } latch.countUp(); class ThreadWait extends Thread { private volatile boolean waiting = false;
293294295296297298299300301302303
Assert.assertEquals(false, t.waiting); Assert.assertNull(t.e); latch.countUp(); t = new ThreadWait(); t.start(); t.readyLatch.await();