references = obj_2.getAllReferences();
assertNotNull(references);
assertEquals("1 references expected for object: "+obj_2, 1, references.size());
assertNotNull(references);
tx.begin();
obj_2 = (MainObject) tx.getBroker().getObjectByIdentity(oid_2);
// we don't change the main object, only add an reference, so the
// cached version of the object isn't up to date
tx.getBroker().retrieveAllReferences(obj_2);
tx.commit();