Assert.assertEquals(3, retryHandler.getRetryCount());
when(request.isAborted()).thenReturn(Boolean.FALSE);
when(context.getAttribute(ExecutionContext.HTTP_REQUEST)).thenReturn(request);
Assert.assertFalse(retryHandler.retryRequest(new ConnectTimeoutException(), 1, context));
}
@Test
public void noRetryOnUnknownHost() throws Exception {
HttpContext context = mock(HttpContext.class);