public void testCommitChangesToParentOneToOne() throws Exception {
ObjectContext child = clientContext.createChildContext();
ClientMtTooneMaster master = child.newObject(ClientMtTooneMaster.class);
ClientMtTooneDep dep = child.newObject(ClientMtTooneDep.class);
master.setToDependent(dep);
child.commitChangesToParent();
ClientMtTooneMaster masterParent = (ClientMtTooneMaster) clientContext
.getGraphManager()
.getNode(master.getObjectId());
ClientMtTooneDep depParent = (ClientMtTooneDep) clientContext
.getGraphManager()
.getNode(dep.getObjectId());
assertNotNull(masterParent);
assertNotNull(depParent);
assertSame(masterParent, depParent.getToMaster());
assertSame(depParent, masterParent.getToDependent());
// check that arc changes got recorded in the parent context
GraphDiff diffs = clientContext.internalGraphManager().getDiffs();