@Test public void testForRetriableExceptions() throws Exception { RetryHandler retryHandler = mock(RetryHandler.class); RetryHandlerWrapper handler = new RetryHandlerWrapper(retryHandler); doReturn(true).when(retryHandler).retryRequest(any(IOException.class), anyInt()); assertThat(handler.retryRequest(mock(IOException.class), 29, mock(HttpContext.class)), is(true)); verify(retryHandler).retryRequest(any(IOException.class), eq(29)); }
@Override public boolean retryRequest( final IOException exception, final int executionCount, final HttpContext context) { return super.retryRequest(exception, executionCount, context) && retryHandler.retryRequest(exception, executionCount); }
RetryHandlerWrapper extends DefaultHttpRequestRetryHandler { @Override public boolean retryRequest( final IOException exception, final int executionCount, final HttpContext context) { return super.retryRequest(exception, executionCount, context) && retryHandler.retryRequest(exception, executionCount); } }
RetryHandlerWrapper extends DefaultHttpRequestRetryHandler { @Override public boolean retryRequest( final IOException exception, final int executionCount, final HttpContext context) { return super.retryRequest(exception, executionCount, context) && retryHandler.retryRequest(exception, executionCount); } RetryHandlerWrapper(RetryHandler retryHandler); }
RetryHandlerWrapper extends DefaultHttpRequestRetryHandler { @Override public boolean retryRequest( final IOException exception, final int executionCount, final HttpContext context) { return super.retryRequest(exception, executionCount, context) && retryHandler.retryRequest(exception, executionCount); } RetryHandlerWrapper(RetryHandler retryHandler); @Override boolean retryRequest(
      final IOException exception,
      final int executionCount,
      final HttpContext context); }
RetryHandlerWrapper extends DefaultHttpRequestRetryHandler { @Override public boolean retryRequest( final IOException exception, final int executionCount, final HttpContext context) { return super.retryRequest(exception, executionCount, context) && retryHandler.retryRequest(exception, executionCount); } RetryHandlerWrapper(RetryHandler retryHandler); @Override boolean retryRequest(
      final IOException exception,
      final int executionCount,
      final HttpContext context);  }