@Test
public void testClassRemovedFromHierarchy() throws Throwable {
final OrigLvl3 origLvl3 = new OrigLvl3(123, "blah", new int[] { 1, 2, 3 }, "bzzzz", true, "fooble");
runReadWriteTest(new ReadWriteTest() {
public void configure(final MarshallingConfiguration configuration) throws Throwable {
configuration.setClassResolver(new SimpleClassResolver(getClass().getClassLoader()) {
public String getClassName(final Class<?> clazz) throws IOException {
if (clazz == OrigLvl1.class || clazz == OrigLvl2.class || clazz == OrigLvl3.class) {
return clazz.getName().replace("Orig", "New");
} else {
return clazz.getName();