OWLOntologyDocumentSource documentSource = getDocument();
OWLOntologyID initialUniqueOWLOntologyID = new OWLOntologyID(
Optional.of(jb), Optional.<IRI> absent());
OWLOntology initialOntology = manager
.createOntology(initialUniqueOWLOntologyID);
OWLParser parser = new RDFXMLParser();
parser.parse(documentSource, initialOntology, config);
assertEquals(jb, initialOntology.getOntologyID().getOntologyIRI().get());
// FIXME: versionIRI is null for some reason even though it was in the
// document
assertEquals(v1, initialOntology.getOntologyID().getVersionIRI().get());
OWLOntologyDocumentSource secondDocumentSource = getDocument();
OWLOntologyID secondUniqueOWLOntologyID = new OWLOntologyID(
Optional.of(jb), Optional.of(v2));
OWLOntology secondOntology = manager
.createOntology(secondUniqueOWLOntologyID);
OWLParser secondParser = new RDFXMLParser();
// NOTE: The following call throws the OWLOntologyRenameException before
// the patch to TypeOntologyHandler and TPVersionIRIHandler
secondParser.parse(secondDocumentSource, secondOntology, config);
assertEquals(jb, secondOntology.getOntologyID().getOntologyIRI().get());
assertEquals(v2, secondOntology.getOntologyID().getVersionIRI().get());
}