@Test
public void getDelays() {

    ExponentialBackoffDelayStrategy strategy = new ExponentialBackoffDelayStrategy(30000L);
    WaitContext context = new WaitContext(System.currentTimeMillis());
    assertEquals(1000L, strategy.nextDelay(context));
    context.incrementAttempts();
    assertEquals(2000L, strategy.nextDelay(context));
    context.incrementAttempts();
    assertEquals(4000L, strategy.nextDelay(context));
    context.incrementAttempts();
    assertEquals(8000L, strategy.nextDelay(context));
    context.incrementAttempts();
    assertEquals(16000L, strategy.nextDelay(context));
    context.incrementAttempts();
    assertEquals(30000L, strategy.nextDelay(context));
    context.incrementAttempts();
    assertEquals(30000L, strategy.nextDelay(context));
}