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