// - an HttpResponse
HttpResponse httpResponse = new HttpResponse();
httpResponse.withStatusCode(HttpStatusCode.OK_200.code());
httpResponse.withBody("somebody");
httpResponse.withHeaders(new Header("headerName1", "headerValue1"), new Header("headerName2", "headerValue2"));
httpResponse.withCookies(new Cookie("cookieName1", "cookieValue1"), new Cookie("cookieName2", "cookieValue2"));
// - an HttpServletResponse
MockHttpServletResponse httpServletResponse = new MockHttpServletResponse();
// when
new MockServerToHttpServletResponseMapper().mapMockServerResponseToHttpServletResponse(httpResponse, httpServletResponse);