byte[] initialhash = mt.hash(full);
ByteArrayDataOutput out = ByteStreams.newDataOutput();
MerkleTree.serializer.serialize(mt, out, MessagingService.current_version);
byte[] serialized = out.toByteArray();
ByteArrayDataInput in = ByteStreams.newDataInput(serialized);
MerkleTree restored = MerkleTree.serializer.deserialize(in, MessagingService.current_version);
assertHashEquals(initialhash, restored.hash(full));