StubResponseHeaderConfigurer { public void addWilmaInfoToResponseHeader(final HttpServletRequest req, final HttpServletResponse resp, final String dialogDescriptorName) { String wilmaSequence = req.getHeader(WilmaHttpEntity.WILMA_SEQUENCE_ID); if (wilmaSequence != null) { resp.addHeader(WilmaHttpEntity.WILMA_SEQUENCE_ID, wilmaSequence + "," + dialogDescriptorName); } else { resp.addHeader(WilmaHttpEntity.WILMA_SEQUENCE_ID, dialogDescriptorName); } }  void addWilmaInfoToResponseHeader(final HttpServletRequest req, final HttpServletResponse resp, final String dialogDescriptorName); void setResponseContentTypeAndStatus(final HttpServletResponse resp, final ResponseDescriptorDTO responseDescriptorDTO); void setErrorResponseContentTypeAndStatus(final HttpServletResponse resp);  }
@Test public void testAddWilmaInfoToResponseHeaderShouldAddNewHeadersToResponseWhenWilmaSequencNotExistInRequestHeader() { given(request.getHeader(WilmaHttpEntity.WILMA_SEQUENCE_ID)).willReturn(null); underTest.addWilmaInfoToResponseHeader(request, response, DIALOG_DESCRIPTOR_NAME); verify(response).addHeader(WilmaHttpEntity.WILMA_SEQUENCE_ID, DIALOG_DESCRIPTOR_NAME); }
@Test public void testAddWilmaInfoToResponseHeaderShouldAddNewHeadersToResponseWhenWilmaSequencExistsInRequestHeader() { given(request.getHeader(WilmaHttpEntity.WILMA_SEQUENCE_ID)).willReturn(DIALOG_DESCRIPTOR_NAME); underTest.addWilmaInfoToResponseHeader(request, response, DIALOG_DESCRIPTOR_NAME); verify(response).addHeader(WilmaHttpEntity.WILMA_SEQUENCE_ID, DIALOG_DESCRIPTOR_NAME + "," + DIALOG_DESCRIPTOR_NAME); }