assertNoRouteException(exception, message);
}
private void assertNoRouteException(JMSException exception, Message message)
{
AMQNoRouteException noRouteException = (AMQNoRouteException) exception.getLinkedException();
assertNotNull("AMQNoRouteException should be linked to JMSException", noRouteException);
Message bounceMessage = (Message) noRouteException.getUndeliveredMessage();
assertNotNull("Bounced Message is expected", bounceMessage);
try
{
assertEquals("Unexpected message is bounced", message.getJMSMessageID(), bounceMessage.getJMSMessageID());