* Test method for {@link org.jboss.ha.framework.server.SimpleCachableMarshalledValue#toByteArray()}.
*/
public void testToByteArray() throws Exception
{
GUID guid = new GUID();
SimpleCachableMarshalledValue mv = new SimpleCachableMarshalledValue(guid);
assertNull(mv.peekSerializedForm());
byte[] bytes = mv.toByteArray();
assertNull(mv.peekUnderlyingObject());
assertSame(bytes, mv.peekSerializedForm());
byte[] bytes2 = mv.toByteArray();
assertSame(bytes, bytes2);
SimpleCachableMarshalledValue copy = replicate(mv);
assertEquals(copy.peekSerializedForm(), copy.toByteArray());
mv = new SimpleCachableMarshalledValue(null);
assertNull(mv.toByteArray());
}