@Test public void testTransformToWilmaHttpRequestShouldGetHeadersToCopyIntoResultWhenOneHeader() { headers.add("Content-type"); headers.add("Any-other-header"); given(request.getHeaderNames()).willReturn(enumeration); underTest.transformToWilmaHttpRequest(WILMA_LOGGER_ID, request, responseDescriptorDTO); verify(request, Mockito.times(2)).getHeader(Matchers.anyString()); }
public WilmaHttpRequest transformToWilmaHttpRequest(final String wilmaLoggerId, final HttpServletRequest request, final ResponseDescriptorDTO responseDescriptorDTO) { WilmaHttpRequest wilmaRequest = new WilmaHttpRequest(); copyServletHeadersIntoWilmaRequest(request, wilmaRequest); copyUnCompressedBodyIntoWilmaRequest(responseDescriptorDTO, wilmaRequest); wilmaRequest.setWilmaMessageId(wilmaLoggerId); return requestCloner.cloneRequest(wilmaRequest); }
HttpServletRequestTransformer { public WilmaHttpRequest transformToWilmaHttpRequest(final String wilmaLoggerId, final HttpServletRequest request, final ResponseDescriptorDTO responseDescriptorDTO) { WilmaHttpRequest wilmaRequest = new WilmaHttpRequest(); copyServletHeadersIntoWilmaRequest(request, wilmaRequest); copyUnCompressedBodyIntoWilmaRequest(responseDescriptorDTO, wilmaRequest); wilmaRequest.setWilmaMessageId(wilmaLoggerId); return requestCloner.cloneRequest(wilmaRequest); } }
HttpServletRequestTransformer { public WilmaHttpRequest transformToWilmaHttpRequest(final String wilmaLoggerId, final HttpServletRequest request, final ResponseDescriptorDTO responseDescriptorDTO) { WilmaHttpRequest wilmaRequest = new WilmaHttpRequest(); copyServletHeadersIntoWilmaRequest(request, wilmaRequest); copyUnCompressedBodyIntoWilmaRequest(responseDescriptorDTO, wilmaRequest); wilmaRequest.setWilmaMessageId(wilmaLoggerId); return requestCloner.cloneRequest(wilmaRequest); }  }
HttpServletRequestTransformer { public WilmaHttpRequest transformToWilmaHttpRequest(final String wilmaLoggerId, final HttpServletRequest request, final ResponseDescriptorDTO responseDescriptorDTO) { WilmaHttpRequest wilmaRequest = new WilmaHttpRequest(); copyServletHeadersIntoWilmaRequest(request, wilmaRequest); copyUnCompressedBodyIntoWilmaRequest(responseDescriptorDTO, wilmaRequest); wilmaRequest.setWilmaMessageId(wilmaLoggerId); return requestCloner.cloneRequest(wilmaRequest); }  WilmaHttpRequest transformToWilmaHttpRequest(final String wilmaLoggerId, final HttpServletRequest request, final ResponseDescriptorDTO responseDescriptorDTO); }
HttpServletRequestTransformer { public WilmaHttpRequest transformToWilmaHttpRequest(final String wilmaLoggerId, final HttpServletRequest request, final ResponseDescriptorDTO responseDescriptorDTO) { WilmaHttpRequest wilmaRequest = new WilmaHttpRequest(); copyServletHeadersIntoWilmaRequest(request, wilmaRequest); copyUnCompressedBodyIntoWilmaRequest(responseDescriptorDTO, wilmaRequest); wilmaRequest.setWilmaMessageId(wilmaLoggerId); return requestCloner.cloneRequest(wilmaRequest); }  WilmaHttpRequest transformToWilmaHttpRequest(final String wilmaLoggerId, final HttpServletRequest request, final ResponseDescriptorDTO responseDescriptorDTO);  }