SimpleExponentialBackoffStrategy implements BackoffStrategy { @Override public long delayBeforeNextRetry(AmazonWebServiceRequest originalRequest, AmazonClientException exception, int retriesAttempted) { long delay = (long) Math.pow(2, retriesAttempted) * SECOND_IN_MS; LOGGER.warn("delayBeforeNextRetryInMilliseconds={} retriesAttempted={}", delay, retriesAttempted, exception); return delay; }  @Override long delayBeforeNextRetry(AmazonWebServiceRequest originalRequest, AmazonClientException exception, int retriesAttempted);  }
@Test public void assertExponentialBackoff() { long delayBeforeNextRetry = simpleExponentialBackoffStrategy.delayBeforeNextRetry(null, new AmazonClientException("test"), 2); Assert.assertEquals(4000l, delayBeforeNextRetry); }