TypeDomain domain = new TypeDomain();
domain.addTypeModel(A2.class);
SerializationContext context = new SerializationContext(domain);
context.addFactory(new A1());
A2 a2 = new A2();
assertSame(A1.instance, context.clone(a2));
}
public void testFactoryThrowsException() throws Exception
{
TypeDomain domain = new TypeDomain();