RetryPolicyFactory { public RetryPolicy getRetryPolicy() { return new RetryPolicy(PredefinedRetryPolicies.DEFAULT_RETRY_CONDITION, backoffStrategy, configurationHelper.getProperty(ConfigurationValue.AWS_MAX_RETRY_ATTEMPT, Integer.class), true); }  RetryPolicy getRetryPolicy();  }
@Test public void assertResultRetryPolicyConfiguredCorrectly() { int expectedMaxErrorRetry = 12345; when(configurationHelper.getProperty(any(), eq(Integer.class))).thenReturn(expectedMaxErrorRetry); RetryPolicy retryPolicy = retryPolicyFactory.getRetryPolicy(); assertEquals(PredefinedRetryPolicies.DEFAULT_RETRY_CONDITION, retryPolicy.getRetryCondition()); assertEquals(backoffStrategy, retryPolicy.getBackoffStrategy()); assertEquals(expectedMaxErrorRetry, retryPolicy.getMaxErrorRetry()); }