TestClassBProxyI bI = (TestClassBProxyI) bList.get(0);
//bI should now be a dynamic proxy
assertTrue(ProxyHelper.isProxy(bI));
TestClassAWithBProxy a = new TestClassAWithBProxy();
a.setBProxy(bI);
tx.lock(a, Transaction.WRITE);
tx.commit();
//on commit the foreign key in "a" should have been set to
//bOid
String aBOid = a.getBoid();
assertEquals("foreign key should match", b.getOid(), aBOid);
} catch(ODMGException ex) {
fail("ODMGException" + ex);