use of org.jboss.marshalling.cloner.ObjectClonerFactory in project eap-additional-testsuite by jboss-set.
the class MarshallingTestCase method testNoDefaultConstructor.
@Test
public void testNoDefaultConstructor() throws Throwable {
final SerializableWithNonSerializableChildWithNoPublicConstructor object = new SerializableWithNonSerializableChildWithNoPublicConstructor();
final ObjectClonerFactory clonerFactory = ObjectCloners.getCloneableObjectClonerFactory();
final ClonerConfiguration configuration = new ClonerConfiguration();
final ObjectCloner cloner = clonerFactory.createCloner(configuration);
try {
cloner.clone(object);
} catch (InvalidObjectException ioe) {
// This is expected behavior
} catch (Exception e) {
Assert.assertTrue("testNoDefaultConstructor has failed.", false);
}
}
Aggregations