system.shutdown();
}
@Test
public void testRestoreCreatesNewAdapter() {
final DummyObjectData data = new DummyObjectData(new TestProxyOid(5, true), Movie.class.getName(), true, new TestProxyVersion(3));
final DummyEncodeableObjectData name = new DummyEncodeableObjectData("ET", "java.lang.String");
final DummyNullValue reference = new DummyNullValue(Person.class.getName());
// note - the order of the fields is by name, not the order that are
// defined in the specification
data.setFieldContent(new Data[] { reference, name });
final ObjectAdapter object = encoder.decode(data);
assertTrue(object.getObject() instanceof Movie);
final Movie movie = (Movie) object.getObject();
assertEquals("ET", movie.getName());
assertEquals(new TestProxyOid(5, true), object.getOid());
assertEquals(new TestProxyVersion(3), object.getVersion());
}