SimpleRetryPolicy implements RetryPolicy { @Override public long computeDelayBeforeNextRetry(RetryPolicyContext context) { return backoffStrategy.computeDelayBeforeNextRetry(context); } SimpleRetryPolicy(RetryCondition retryCondition, BackoffStrategy backoffStrategy); @Override long computeDelayBeforeNextRetry(RetryPolicyContext context); @Override boolean shouldRetry(RetryPolicyContext context);  }
@Test public void delay_DelegatesToBackoffStrategy() { RetryPolicy policy = new SimpleRetryPolicy(retryCondition, backoffStrategy); policy.computeDelayBeforeNextRetry(RetryPolicyContexts.EMPTY); verify(backoffStrategy).computeDelayBeforeNextRetry(RetryPolicyContexts.EMPTY); }