@Override
    public long sleepTime(final long attempt) {
        checkArgument(attempt >= 0, "attempt must not be negative (%s)", attempt);
        final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt));
        return exponentialSleepTime >= 0 && exponentialSleepTime < maxWait
                ? exponentialSleepTime
                : maxWait;
    }
@Test
    void test64Attempts() {
        final long maxWait = 1000;
        final ExponentialWaitStrategy exponentialWaitStrategy =
                new ExponentialWaitStrategy(1, maxWait);
        assertThat(exponentialWaitStrategy.sleepTime(64)).isEqualTo(maxWait);
    }