@Test public void responseWithHeaders() throws IOException { this.snippet .expectHttpResponse("response-with-headers") .withContents( httpResponse(OK) // .header("Content-Type", "application/json") // .header("a", "alpha")); MockHttpServletResponse response = new MockHttpServletResponse(); response.setContentType(MediaType.APPLICATION_JSON_VALUE); response.setHeader("a", "alpha"); documentHttpResponse("response-with-headers").handle(result(response)); }