* Test method for {@link org.jboss.ha.framework.server.SimpleCachableMarshalledValue#hashCode()}.
*/
public void testHashCode() throws Exception
{
GUID guid = new GUID();
SimpleCachableMarshalledValue mv = new SimpleCachableMarshalledValue(guid);
assertEquals(guid.hashCode(), mv.hashCode());
SimpleCachableMarshalledValue copy = replicate(mv);
assertEquals(guid.hashCode(), copy.hashCode());
mv = new SimpleCachableMarshalledValue(null);
assertEquals(0, mv.hashCode());
FragileObject fragile = new FragileObject();
mv = new SimpleCachableMarshalledValue(fragile, true);
assertEquals(SimpleCachableMarshalledValue.OUR_HASH_CODE, mv.hashCode());
copy = replicate(mv);
assertEquals(mv.hashCode(), copy.hashCode());
mv = new SimpleCachableMarshalledValue(null);
assertEquals(SimpleCachableMarshalledValue.NULL_HASH_CODE, mv.hashCode());
copy = replicate(mv);
assertEquals(mv.hashCode(), copy.hashCode());
mv = new SimpleCachableMarshalledValue(null, true);
assertEquals(SimpleCachableMarshalledValue.OUR_HASH_CODE, mv.hashCode());
copy = replicate(mv);
assertEquals(mv.hashCode(), copy.hashCode());
}