@Override
        public HttpResponse execute(HttpUriRequest request) throws IOException,
                ClientProtocolException {
            if (t instanceof IOException) {
                throw (IOException)t;
            } else if (t instanceof RuntimeException){
                throw (RuntimeException)t;
            } else {
                Assert.fail("The expected throwable should be either an IOException or RuntimeException.");
                return null;
            }
        }
@param t An IOException or RuntimeException object.
aws-java-sdk-core/src/test/java/com/amazonaws/retry/RetryPolicyTestBase.java