final HttpServletResponse response) throws IOException, ServletException {
ConsoleUtils.logIncomingRequest(request, NAME);
baseRequest.setHandled(true);
final StubRequest assertionStubRequest = StubRequest.createFromHttpServletRequest(request);
final StubResponse foundStubResponse = dataStore.findStubResponseFor(assertionStubRequest);
final StubResponseHandlingStrategy strategyStubResponse = StubsResponseHandlingStrategyFactory.getStrategy(foundStubResponse);
final HttpServletResponseWithGetStatus wrapper = new HttpServletResponseWithGetStatus(response);
try {
strategyStubResponse.handle(wrapper, assertionStubRequest);
} catch (final Exception ex) {
HandlerUtils.configureErrorResponse(response, HttpStatus.INTERNAL_SERVER_ERROR_500, ex.toString());
}
ConsoleUtils.logOutgoingResponse(assertionStubRequest.getUrl(), wrapper, "stubs");
}