@Test
public void testExists() throws IOException
{
// Setup : Create and save a target object.
TargetObject targetObject = ModelFactory.eINSTANCE.createTargetObject();
targetObject.setSingleAttribute("junit");
saveObject(targetObject);
// Verify : exists() on the URI converter return true / false as appropriate
assertTrue(targetObject.eResource().getResourceSet().getURIConverter().exists(targetObject.eResource().getURI(), null));
assertFalse(targetObject.eResource().getResourceSet().getURIConverter().exists(targetObject.eResource().getURI().trimSegments(1).appendQuery(""), null));
assertFalse(targetObject.eResource().getResourceSet().getURIConverter().exists(targetObject.eResource().getURI().trimSegments(1).appendSegment("id"), null));
assertFalse(targetObject.eResource().getResourceSet().getURIConverter().exists(URI.createURI("mongodb://host:8080/junit/junit/id"), null));
}