JmsResponseBuilder implements ResponseBuilder { @Override public void buildResponse(final WilmaHttpEntity entity) { WilmaHttpResponse response = (WilmaHttpResponse) entity; jmsTemplate.send(responseQueue, messageCreatorFactory.create(response, true)); }  @Override void buildResponse(final WilmaHttpEntity entity);  }
@Test public void testBuildResponseShouldSendResponseToJmsQueueWhenHeadersContainsWilmaLoggerId() { given(messageCreatorFactory.create(wilmaHttpResponse, true)).willReturn(jmsResponseMessageCreator); underTest.buildResponse(wilmaHttpResponse); verify(jmsTemplate).send(responseQueue, jmsResponseMessageCreator); }