### Question:
DefaultHttpRequestRetryStrategy implements HttpRequestRetryStrategy { @Override public boolean retryRequest( final HttpRequest request, final IOException exception, final int execCount, final HttpContext context) { Args.notNull(request, "request"); Args.notNull(exception, "exception"); if (execCount > this.maxRetries) { return false; } if (this.nonRetriableIOExceptionClasses.contains(exception.getClass())) { return false; } else { for (final Class<? extends IOException> rejectException : this.nonRetriableIOExceptionClasses) { if (rejectException.isInstance(exception)) { return false; } } } if (request instanceof CancellableDependency && ((CancellableDependency) request).isCancelled()) { return false; } return handleAsIdempotent(request); } protected  DefaultHttpRequestRetryStrategy(
            final int maxRetries,
            final TimeValue defaultRetryInterval,
            final Collection<Class<? extends IOException>> clazzes,
            final Collection<Integer> codes);  DefaultHttpRequestRetryStrategy(
            final int maxRetries,
            final TimeValue defaultRetryInterval);  DefaultHttpRequestRetryStrategy(); @Override boolean retryRequest(
            final HttpRequest request,
            final IOException exception,
            final int execCount,
            final HttpContext context); @Override boolean retryRequest(
            final HttpResponse response,
            final int execCount,
            final HttpContext context); @Override TimeValue getRetryInterval(
            final HttpResponse response,
            final int execCount,
            final HttpContext context); static final DefaultHttpRequestRetryStrategy INSTANCE; }### Answer:
@Test public void noRetryOnConnectTimeout() throws Exception { final HttpGet request = new HttpGet("/"); Assert.assertFalse(retryStrategy.retryRequest(request, new SocketTimeoutException(), 1, null)); }
@Test public void noRetryOnConnect() throws Exception { final HttpGet request = new HttpGet("/"); Assert.assertFalse(retryStrategy.retryRequest(request, new ConnectException(), 1, null)); }
@Test public void noRetryOnConnectionClosed() throws Exception { final HttpGet request = new HttpGet("/"); Assert.assertFalse(retryStrategy.retryRequest(request, new ConnectionClosedException(), 1, null)); }
@Test public void noRetryOnSSLFailure() throws Exception { final HttpGet request = new HttpGet("/"); Assert.assertFalse(retryStrategy.retryRequest(request, new SSLException("encryption failed"), 1, null)); }
@Test public void noRetryOnUnknownHost() throws Exception { final HttpGet request = new HttpGet("/"); Assert.assertFalse(retryStrategy.retryRequest(request, new UnknownHostException(), 1, null)); }
@Test public void noRetryOnAbortedRequests() throws Exception { final HttpGet request = new HttpGet("/"); request.cancel(); Assert.assertFalse(retryStrategy.retryRequest(request, new IOException(), 1, null)); }
@Test public void retryOnNonAbortedRequests() throws Exception { final HttpGet request = new HttpGet("/"); Assert.assertTrue(retryStrategy.retryRequest(request, new IOException(), 1, null)); }