boolean gotPredicate = event.waitMsecs(2);
assertTrue(gotPredicate);
event.reset();
when(mockTime.getMilliseconds()).
thenReturn(0L).thenReturn(2L);
gotPredicate = event.waitMsecs(0);
assertFalse(gotPredicate);
}
/**
* Thread signaled test for {@link PredicateLock#waitForever()}