assertNotNull(producer);
producer.send(createMessage(session, "invalidBody", "myHeader", "xyz"));
producer.send(createMessage(session, "validBody", "myHeader", "abc"));
messageList.assertMessagesArrived(1);
assertEquals("validBody", ((TextMessage) messageList.flushMessages().get(0)).getText());
}
private javax.jms.Message createMessage(Session session, String body, String header, String value) throws JMSException {
TextMessage msg = session.createTextMessage(body);