public static Builder builder() {
        return new Builder();
    }
@Test
    public void testBackOffWithMaxTime() {
        final BackOff backOff = BackOff.builder().maxElapsedTime(9, TimeUnit.SECONDS).build();
        final BackOffTimerTask context = new BackOffTimerTask(backOff, null, t -> true);

        long delay;

        for (int i = 1; i <= 5; i++) {
            delay = context.next();
            assertEquals(i, context.getCurrentAttempts());
            assertEquals(BackOff.DEFAULT_DELAY.toMillis(), delay);
            assertEquals(BackOff.DEFAULT_DELAY.toMillis(), context.getCurrentDelay());
            assertEquals(BackOff.DEFAULT_DELAY.toMillis() * i, context.getCurrentElapsedTime());
        }

        delay = context.next();
        assertEquals(6, context.getCurrentAttempts());
        assertEquals(BackOff.NEVER, delay);
    }