// good
}
}
public void testWrongChildType_Update() throws IllegalAccessException, InstantiationException {
SuperParentWithSuperChild parent = new SuperParentWithSuperChild();
parent.setSuperParentString("a string");
beginTxn();
em.persist(parent);
commitTxn();
beginTxn();
parent = em.find(parent.getClass(), parent.getId());
// working around more runtime enhancer madness
Object child = SubChild.class.newInstance();
parent.setSuperParentSuperChild((SuperChild) child);
try {
commitTxn();
fail("expected exception");
} catch (UnsupportedOperationException uoe) {