HttpServerConnection conn = Mockito.mock(HttpServerConnection.class);
HttpRequest request = new BasicHttpRequest("GET", "/", new HttpVersion(20, 45));
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);
Mockito.when(connReuseStrategy.keepAlive(response, context)).thenReturn(false);
httpservice.handleRequest(conn, context);
Mockito.verify(responseFactory).newHttpResponse(HttpVersion.HTTP_1_1, 200, context);
}