ActiveMQMessageReader reader = new ActiveMQMessageReader();
ActiveMQMessageWriter writer = new ActiveMQMessageWriter();
ActiveMQMessage msg1 = new ActiveMQMessage();
initializeMessage(msg1);
byte[] data = writer.writePacketToByteArray(msg1);
ActiveMQMessage msg2 = (ActiveMQMessage) reader.readPacketFromByteArray(data);
testEquals(msg1, msg2);
ActiveMQMessage msg3 = msg2.shallowCopy();
testEquals(msg1,msg3);
data = writer.writePacketToByteArray(msg3);