}
// inherit javadoc
public void run() throws Exception {
FakeObject fo = new FakeObject(new AssertionError());
MarshalledInstance mi1;
MarshalledInstance mi2;
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 1: "
+ "Same serialized forms, same codebases");
logger.log(Level.FINE,"");
// construct 2 MarshalledInstances using same constructor
mi1 = new MarshalledInstance(fo);
mi2 = new MarshalledInstance(fo);
checkEquals(true, mi1, mi2);
checkFullyEquals(true, mi1, mi2);
// construct 2 MarshalledInstances using different constructor
mi1 = new MarshalledInstance(fo);
mi2 = new MarshalledInstance(new MarshalledObject(fo));
checkEquals(true, mi1, mi2);
checkFullyEquals(true, mi1, mi2);
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 2: "
+ "Different serialized forms, same codebases");
logger.log(Level.FINE,"");
mi1 = new MarshalledInstance(fo);
mi2 = new MarshalledInstance(new File("foo"));
checkEquals(false, mi1, mi2);
checkFullyEquals(false, mi1, mi2);
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 3: "
+ "Same serialized form, different codebases");
logger.log(Level.FINE,"");
mi1 = new MarshalledInstance(fo);
FakeRMIClassLoaderSpi.getClassAnnotationReturn = "http://fake";
mi2 = new MarshalledInstance(fo);
FakeRMIClassLoaderSpi.getClassAnnotationReturn = null;
checkEquals(true, mi1, mi2);
checkFullyEquals(false, mi1, mi2);
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 4: "
+ "Different serialized forms, different codebases");
logger.log(Level.FINE,"");
FakeRMIClassLoaderSpi.getClassAnnotationReturn = "http://fake1";
mi1 = new MarshalledInstance(fo);
FakeRMIClassLoaderSpi.getClassAnnotationReturn = "http://fake2";
mi2 = new MarshalledInstance(new File("fakeFile"));
FakeRMIClassLoaderSpi.getClassAnnotationReturn = null;
checkEquals(false, mi1, mi2);
checkFullyEquals(false, mi1, mi2);
logger.log(Level.FINE,"=================================");
logger.log(Level.FINE,"test case 5: "
+ "MarshalledInstance and non-MarshalledInstance comparison");
logger.log(Level.FINE,"");
mi1 = new MarshalledInstance(fo);
checkEquals(false, mi1, fo);
assertion(! mi1.fullyEquals(fo));
}