String location = "/ontologies/naming/named-1.owl";
OWLOntologyID expectedId = new OWLOntologyID(
IRI.create("http://stanbol.apache.org/ontologies/test/naming/named-1"));
URL url = getClass().getResource(location);
OWLOntologyManager onMgr = OWLManager.createOWLOntologyManager();
OWLOntology o1 = onMgr.loadOntologyFromOntologyDocument(IRI.create(url));
assertFalse(o1.isAnonymous());
assertEquals(expectedId, o1.getOntologyID());
// in = getClass().getResourceAsStream(location); // use if stream cannot be reset
OWLOntologyID key = ontologyProvider.loadInStore(IRI.create(url), RDF_XML, false);
assertNotNull(key);