public void testOptStateTransitions5()
throws Exception {
OpenJPAEntityManager pm = getPM(true, false);
startTx(pm);
ModRuntimeTest2 b = pm.find(ModRuntimeTest2.class, _id);
ModRuntimeTest1 parent = b.getSelfOneOne();
assertNotNull("parent is null", parent);
pm.remove(b);
endTx(pm);
// parent should be valid
assertEquals("PARENT", parent.getStringField());
// 'b' should be cleared
assertNull(b.getStringField());
assertEquals(0, b.getIntField());
assertNull(b.getSelfOneOne());
}