@Test public void testCloneResponseShouldReturnResponseHeaders() { response.addHeader(CONTENT_TYPE_HEADER, XML_CONTENT); response.addHeader(CONTENT_ENCODING_HEADER, GZIP_CONTENT); WilmaHttpResponse actual = underTest.cloneResponse(response); assertEquals(actual.getHeader(CONTENT_TYPE_HEADER), XML_CONTENT); assertEquals(actual.getHeader(CONTENT_ENCODING_HEADER), GZIP_CONTENT); }
public WilmaHttpResponse cloneResponse(final WilmaHttpResponse response) { WilmaHttpResponse result = new WilmaHttpResponse(response.isVolatile()); result.setStatusCode(response.getStatusCode()); result.setContentType(response.getContentType()); result.setBody(response.getBody()); copyHeaders(response, result); result.setWilmaMessageId(response.getWilmaMessageId()); return result; }
WilmaHttpResponseCloner { public WilmaHttpResponse cloneResponse(final WilmaHttpResponse response) { WilmaHttpResponse result = new WilmaHttpResponse(response.isVolatile()); result.setStatusCode(response.getStatusCode()); result.setContentType(response.getContentType()); result.setBody(response.getBody()); copyHeaders(response, result); result.setWilmaMessageId(response.getWilmaMessageId()); return result; } }
WilmaHttpResponseCloner { public WilmaHttpResponse cloneResponse(final WilmaHttpResponse response) { WilmaHttpResponse result = new WilmaHttpResponse(response.isVolatile()); result.setStatusCode(response.getStatusCode()); result.setContentType(response.getContentType()); result.setBody(response.getBody()); copyHeaders(response, result); result.setWilmaMessageId(response.getWilmaMessageId()); return result; }  }
WilmaHttpResponseCloner { public WilmaHttpResponse cloneResponse(final WilmaHttpResponse response) { WilmaHttpResponse result = new WilmaHttpResponse(response.isVolatile()); result.setStatusCode(response.getStatusCode()); result.setContentType(response.getContentType()); result.setBody(response.getBody()); copyHeaders(response, result); result.setWilmaMessageId(response.getWilmaMessageId()); return result; }  WilmaHttpResponse cloneResponse(final WilmaHttpResponse response); }
WilmaHttpResponseCloner { public WilmaHttpResponse cloneResponse(final WilmaHttpResponse response) { WilmaHttpResponse result = new WilmaHttpResponse(response.isVolatile()); result.setStatusCode(response.getStatusCode()); result.setContentType(response.getContentType()); result.setBody(response.getBody()); copyHeaders(response, result); result.setWilmaMessageId(response.getWilmaMessageId()); return result; }  WilmaHttpResponse cloneResponse(final WilmaHttpResponse response);  }