public void waitAtMostWorks() throws Exception {
new AssertExceptionThrownInAnotherThreadButNeverCaughtByAnyThreadTest() {
@Override
public void testLogic() throws Exception {
new ExceptionThrowingAsynch(new IllegalStateException("Illegal state!")).perform();
dontCatchUncaughtExceptions().and().given().pollInterval(Duration.ONE_HUNDRED_MILLISECONDS).then().await().atMost(ONE_SECOND)
.untilCall(to(fakeRepository).getValue(), equalTo(1));
waitAtMost(ONE_SECOND).and().dontCatchUncaughtExceptions().untilCall(to(fakeRepository).getValue(), equalTo(1));
dontCatchUncaughtExceptions().and().await().atMost(ONE_SECOND).untilCall(to(fakeRepository).getValue(), equalTo(1));
dontCatchUncaughtExceptions().and().await().untilCall(to(fakeRepository).getValue(), equalTo(1));