public void thread1() { try { sync.acquire(1); c.awaitNanos(1000 * 1000 * 1000); // 1 sec sync.release(1); fail("should throw exception"); } catch (InterruptedException success) { assertTick(1); } }