public void shouldCallbackMatchedExpectation() throws IOException {
// given
HttpRequest request = new HttpRequest().withPath("somepath");
HttpCallback callback = new HttpCallback().withCallbackClass("some-class");
HttpResponse response = new HttpResponse();
MockHttpServletResponse httpServletResponse = new MockHttpServletResponse();
MockHttpServletRequest httpServletRequest = new MockHttpServletRequest("GET", "somepath");
when(mockHttpServletToMockServerRequestMapper.mapHttpServletRequestToMockServerRequest(any(HttpServletRequest.class))).thenReturn(request);
when(mockMockServerMatcher.handle(any(HttpRequest.class))).thenReturn(callback);
when(mockActionHandler.processAction(any(HttpCallback.class), any(HttpRequest.class))).thenReturn(response);
// when
mockServerServlet.doGet(httpServletRequest, httpServletResponse);
// then
when(mockHttpServletToMockServerRequestMapper.mapHttpServletRequestToMockServerRequest(httpServletRequest)).thenReturn(request);
verify(mockMockServerMatcher).handle(request);
when(mockActionHandler.processAction(callback, request)).thenReturn(response);
verify(mockMockServerToHttpServletResponseMapper).mapMockServerResponseToHttpServletResponse(response, httpServletResponse);
assertThat(httpServletResponse.getStatus(), is(200));
}