public static void injectMockHttpClient(AmazonHttpClient amazonHttpClient, ConnectionManagerAwareHttpClient mockHttpClient) {
        try {
            Field f = AmazonHttpClient.class.getDeclaredField("httpClient");
            f.setAccessible(true);
            f.set(amazonHttpClient, mockHttpClient);
        } catch (Exception e) {
            Assert.fail("Cannot inject the mock HttpClient object. " + e.getMessage());
        }
    }
The retry condition and back-off strategy implementations that record all
the context data passed into shouldRetry and calculateSleepTime methods.
aws-java-sdk-core/src/test/java/com/amazonaws/retry/RetryPolicyTestBase.java