@Test(expectedExceptions = JMSException.class) public void testCreateMessageShouldThrowJmsExceptionWhenSetObjectThrowsJMSException() throws JMSException { given(session.createObjectMessage()).willReturn(objectMessage); willThrow(new JMSException(NO_WILMA_LOGGER_ID)).given(objectMessage).setObject(response); underTest.createMessage(session); }
@Override public Message createMessage(final Session session) throws JMSException { ObjectMessage message = session.createObjectMessage(); message.setObject(wilmaHttpResponse); message.setBooleanProperty("bodyDecompressed", bodyDecompressed); return message; }
JmsResponseMessageCreator implements MessageCreator { @Override public Message createMessage(final Session session) throws JMSException { ObjectMessage message = session.createObjectMessage(); message.setObject(wilmaHttpResponse); message.setBooleanProperty("bodyDecompressed", bodyDecompressed); return message; } }
JmsResponseMessageCreator implements MessageCreator { @Override public Message createMessage(final Session session) throws JMSException { ObjectMessage message = session.createObjectMessage(); message.setObject(wilmaHttpResponse); message.setBooleanProperty("bodyDecompressed", bodyDecompressed); return message; } JmsResponseMessageCreator(final WilmaHttpResponse wilmaHttpResponse, final boolean bodyDecompressed); }
JmsResponseMessageCreator implements MessageCreator { @Override public Message createMessage(final Session session) throws JMSException { ObjectMessage message = session.createObjectMessage(); message.setObject(wilmaHttpResponse); message.setBooleanProperty("bodyDecompressed", bodyDecompressed); return message; } JmsResponseMessageCreator(final WilmaHttpResponse wilmaHttpResponse, final boolean bodyDecompressed); @Override Message createMessage(final Session session); }
JmsResponseMessageCreator implements MessageCreator { @Override public Message createMessage(final Session session) throws JMSException { ObjectMessage message = session.createObjectMessage(); message.setObject(wilmaHttpResponse); message.setBooleanProperty("bodyDecompressed", bodyDecompressed); return message; } JmsResponseMessageCreator(final WilmaHttpResponse wilmaHttpResponse, final boolean bodyDecompressed); @Override Message createMessage(final Session session);  }