}
public void testReadPacket() {
ActiveMQObjectMessageReader reader = new ActiveMQObjectMessageReader();
ActiveMQObjectMessageWriter writer = new ActiveMQObjectMessageWriter();
ActiveMQObjectMessage msg1 = new ActiveMQObjectMessage();
try {
msg1.setObject(this.table);
super.initializeMessage(msg1);
byte[] data = writer.writePacketToByteArray(msg1);
ActiveMQObjectMessage msg2 = (ActiveMQObjectMessage) reader.readPacketFromByteArray(data);
super.testEquals(msg1, msg2);
assertTrue(msg1.getObject().equals(msg2.getObject()));
}
catch (IOException e) {
e.printStackTrace();
assertTrue(false);
}