HttpResponse resp100 = new BasicHttpResponse(HttpVersion.HTTP_1_1, 100, "Continue");
Mockito.when(responseFactory.newHttpResponse(HttpVersion.HTTP_1_1, 100, context)).thenReturn(resp100);
HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_0, 500, "Oppsie");
Mockito.when(responseFactory.newHttpResponse(HttpVersion.HTTP_1_0, 500, context)).thenReturn(response);
Mockito.doThrow(new HttpException("Oopsie")).when(expectationVerifier).verify(request, resp100, context);
Mockito.when(connReuseStrategy.keepAlive(response, context)).thenReturn(false);
httpservice.handleRequest(conn, context);
Assert.assertSame(conn, context.getAttribute(ExecutionContext.HTTP_CONNECTION));
Assert.assertSame(request, context.getAttribute(ExecutionContext.HTTP_REQUEST));