assertTrue(msg.getPacketType() == Packet.ACTIVEMQ_BYTES_MESSAGE);
}
public void testReadPacket() {
ActiveMQBytesMessageReader reader = new ActiveMQBytesMessageReader();
ActiveMQBytesMessageWriter writer = new ActiveMQBytesMessageWriter();
ActiveMQBytesMessage msg1 = new ActiveMQBytesMessage();
try {
msg1.setBodyAsBytes(testdata);
super.initializeMessage(msg1);
byte[] data = writer.writePacketToByteArray(msg1);
ActiveMQBytesMessage msg2 = (ActiveMQBytesMessage) reader.readPacketFromByteArray(data);
super.testEquals(msg1, msg2);
byte[] d2 = msg2.getBodyAsBytes();
assertTrue(d2.length==testdata.length);
for(int i = 0; i < testdata.length; i++)