@Test public void firstConditionIsTrue_ReturnsTrue() { when(conditionOne.shouldRetry(any(RetryPolicyContext.class))) .thenReturn(true); assertTrue(orCondition.shouldRetry(RetryPolicyContexts.EMPTY)); }
@Override public boolean shouldRetry(RetryPolicyContext context) { for (RetryCondition retryCondition : conditions) { if (retryCondition.shouldRetry(context)) { return true; } } return false; }
OrRetryCondition implements RetryCondition { @Override public boolean shouldRetry(RetryPolicyContext context) { for (RetryCondition retryCondition : conditions) { if (retryCondition.shouldRetry(context)) { return true; } } return false; } }
OrRetryCondition implements RetryCondition { @Override public boolean shouldRetry(RetryPolicyContext context) { for (RetryCondition retryCondition : conditions) { if (retryCondition.shouldRetry(context)) { return true; } } return false; } OrRetryCondition(RetryCondition... conditions); }
OrRetryCondition implements RetryCondition { @Override public boolean shouldRetry(RetryPolicyContext context) { for (RetryCondition retryCondition : conditions) { if (retryCondition.shouldRetry(context)) { return true; } } return false; } OrRetryCondition(RetryCondition... conditions); @Override boolean shouldRetry(RetryPolicyContext context); }
OrRetryCondition implements RetryCondition { @Override public boolean shouldRetry(RetryPolicyContext context) { for (RetryCondition retryCondition : conditions) { if (retryCondition.shouldRetry(context)) { return true; } } return false; } OrRetryCondition(RetryCondition... conditions); @Override boolean shouldRetry(RetryPolicyContext context);  }