if (!(m1 instanceof JBossMessage) && !(m2 instanceof JBossMessage))
{
fail();
}
JBossMessage jm1 = (JBossMessage)m1;
JBossMessage jm2 = (JBossMessage)m2;
assertEquals(jm1.isCorrelationIDBytes(), jm2.isCorrelationIDBytes());
if (jm1.isCorrelationIDBytes())
{
checkByteArraysEqual(jm1.getJMSCorrelationIDAsBytes(), jm2.getJMSCorrelationIDAsBytes());
}
else
{
assertEquals(jm1.getJMSCorrelationID(), jm2.getJMSCorrelationID());
}
assertEquals(jm1.getJMSMessageID(), jm2.getJMSMessageID());
assertEquals(jm1.getJMSRedelivered(), jm2.getJMSRedelivered());
assertEquals(jm1.getJMSType(), jm2.getJMSType());
assertEquals(jm1.getJMSDeliveryMode(), jm2.getJMSDeliveryMode());
assertEquals(jm1.getJMSDestination(), jm2.getJMSDestination());
assertEquals(jm1.getJMSExpiration(), jm2.getJMSExpiration());
assertEquals(jm1.getJMSPriority(), jm2.getJMSPriority());
assertEquals(jm1.getJMSReplyTo(), jm2.getJMSReplyTo());
assertEquals(jm1.getJMSTimestamp(), jm2.getJMSTimestamp());
checkMapsEquivalent(jm1.getJMSProperties(), jm2.getJMSProperties());
}