    @Test
    public void testMaxWait() throws IOException {

        final ASpinWait waitingSpinWait = new ASpinWait() {

            @Override
            protected boolean isConditionFulfilled() {
                return false;
            }
        };
        final Duration maxWait = Duration.ONE_SECOND;
        final Instant waitingSince = new Instant();
        waitingSpinWait.awaitFulfill(waitingSince, maxWait);
        Assertions.assertThat(waitingSince.toDuration()).isGreaterThanOrEqualTo(maxWait);
    }