ack.setMessageRead(this.messageRead);
MessageAckWriter writer = new MessageAckWriter();
MessageAckReader reader = new MessageAckReader();
try {
byte[] data = writer.writePacketToByteArray(ack);
MessageAck mack = (MessageAck) reader.readPacketFromByteArray(data);
assertTrue(mack.getId().equals(this.id));
assertTrue(mack.getConsumerId().equals(this.consumerId));
assertTrue(mack.getTransactionId().equals(this.transactedId));