connReuseStrategy,
responseFactory,
handlerResolver,
params);
HttpContext context = new BasicHttpContext();
HttpServerConnection conn = Mockito.mock(HttpServerConnection.class);
HttpRequest request = new BasicHttpRequest("whatever", "/");
Mockito.when(conn.receiveRequestHeader()).thenReturn(request);
HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
Mockito.when(responseFactory.newHttpResponse(HttpVersion.HTTP_1_1, 200, context)).thenReturn(response);
HttpResponse error = new BasicHttpResponse(HttpVersion.HTTP_1_0, 500, "Oppsie");
Mockito.when(responseFactory.newHttpResponse(HttpVersion.HTTP_1_0, 500, context)).thenReturn(error);
Mockito.when(handlerResolver.lookup("/")).thenReturn(requestHandler);