return (RemoteConfiguration) configObj;
}
@Test
public void remoteConfigurationCloneTest() throws Exception {
RemoteConfiguration orig = new RemoteConfiguration("deploy",
mock(ConnectionFactory.class),
mock(Queue.class),
mock(Queue.class),
mock(Queue.class),
"user", "pass");
orig.setExtraJaxbClasses(new HashSet<Class<?>>());
orig.setProcessInstanceId(123l);
orig.setRemoteInitialContext(remoteInitialContext);
orig.setTimeout(23l);
orig.setUseSsl(false);
setField(orig, "jmsSerializationType", 4);
RemoteConfiguration copy = orig.clone();
Field[] fields = RemoteConfiguration.class.getDeclaredFields();
for( Field field : fields ) {
field.setAccessible(true);
Object origVal = field.get(orig);