// Setup : Create a primary object with multiple cross-document containment references to target
// objects.
ResourceSet resourceSet = createResourceSet();
TargetObject targetObject1 = ModelFactory.eINSTANCE.createTargetObject();
targetObject1.setSingleAttribute("one");
saveObject(resourceSet, targetObject1);
TargetObject targetObject2 = ModelFactory.eINSTANCE.createTargetObject();
targetObject2.setSingleAttribute("two");
saveObject(resourceSet, targetObject2);
PrimaryObject primaryObject = ModelFactory.eINSTANCE.createPrimaryObject();
primaryObject.setName("junit");
primaryObject.getMultipleContainmentReferenceProxies().add(targetObject1);