@Test(expected = JmsConverterException.class)
public void shouldThrowExceptionWhenFailToCreateTextMessage() throws JMSException {

    when(jsonObjectEnvelopeConverter.asJsonString(envelope)).thenReturn(MESSAGE_TEXT);
    doThrow(JMSException.class).when(session).createTextMessage(MESSAGE_TEXT);
    envelopeConverter.toMessage(envelope, session);
}