@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));
}