@Test
public void testForNonRetriableExceptions() throws Exception {

  RetryHandlerWrapper handler = new RetryHandlerWrapper(mock(RetryHandler.class));
  assertThat(handler.retryRequest(mock(InterruptedIOException.class), 1, mock(HttpContext.class)), is(false));
  assertThat(handler.retryRequest(mock(UnknownHostException.class), 1, mock(HttpContext.class)), is(false));
  assertThat(handler.retryRequest(mock(ConnectException.class), 1, mock(HttpContext.class)), is(false));
  assertThat(handler.retryRequest(mock(SSLException.class), 1, mock(HttpContext.class)), is(false));
}