assertNotNull("Message " + index + " not received.", message);
assertEquals("Incorrect message received", index, message.getIntProperty(INDEX));
assertEquals("Incorrect message text for message:" + index, SEND_FROM_ON_MESSAGE_TEXT, message.getStringProperty(MSG));
}
assertNull("Extra message received.", consumer.receiveNoWait());
_consumerSession.close();
assertEquals("Wrong number of messages on queue", 0,
((AMQSession) getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE)).getQueueDepth((AMQDestination) _queue));