ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
ObjectInput oi = marshaller.startObjectInput(bin, false);
MarshalledValue recreated = (MarshalledValue) marshaller.objectFromObjectStream(oi);
// there should be nothing more
assert oi.available() == 0;
marshaller.finishObjectInput(oi);
bin.close();
assertSerialized(recreated);
assert recreated.equals(mv);