TargetObject targetObject2 = ModelFactory.eINSTANCE.createTargetObject();
targetObject2.setSingleAttribute("two");
saveObject(resourceSet, targetObject2);
PrimaryObject primaryObject = ModelFactory.eINSTANCE.createPrimaryObject();
primaryObject.setName("junit");
primaryObject.getMultipleContainmentReferenceProxies().add(targetObject1);
primaryObject.getMultipleContainmentReferenceProxies().add(targetObject2);
saveObject(resourceSet, primaryObject);
ByteArrayOutputStream out = new ByteArrayOutputStream();
Map<Object, Object> options = new HashMap<Object, Object>();
options.put(XMIResource.OPTION_SUPPRESS_XMI, Boolean.TRUE);
primaryObject.eResource().save(out, options);
{
ResourceSet testResourceSet = createResourceSet();
testResourceSet.getURIConverter().getURIMap().put(URI.createURI("../TargetObject/"), targetObject1.eResource().getURI().trimSegments(1).appendSegment(""));