@Test
public void testOwlapiOntologyId() throws Exception {

    org.semanticweb.owlapi.model.IRI oIRI = org.semanticweb.owlapi.model.IRI.create("http://www.test.com/ontology");
    org.semanticweb.owlapi.model.IRI vIRI = org.semanticweb.owlapi.model.IRI.create("http://www.test.com/ontology/1.0.0");
    OWLOntologyID owlId = new OWLOntologyID(oIRI, vIRI);
    SimpleOntologyId simpleId1 = mock(SimpleOntologyId.class);
    expect(simpleId1.getOwlapiOntologyId()).andReturn(owlId);
    OntologyId simpleId2 = mock(OntologyId.class);
    expect(simpleId2.getOntologyIRI()).andReturn(Optional.of(ontologyIRI)).anyTimes();
    expect(simpleId2.getVersionIRI()).andReturn(Optional.of(versionIRI)).anyTimes();
    
    mockStaticPartial(SimpleOntologyValues.class, "owlapiIRI");
    expect(SimpleOntologyValues.owlapiIRI(ontologyIRI)).andReturn(oIRI).anyTimes();
    expect(SimpleOntologyValues.owlapiIRI(versionIRI)).andReturn(vIRI).anyTimes();
    
    replay(simpleId1, simpleId2, SimpleOntologyValues.class);
    OWLOntologyID owlId1 = SimpleOntologyValues.owlapiOntologyId(simpleId1);
    OWLOntologyID owlId2 = SimpleOntologyValues.owlapiOntologyId(simpleId2);
    assertEquals(owlId, owlId1);
    assertEquals(oIRI, owlId2.getOntologyIRI().get());
    assertEquals(vIRI, owlId2.getVersionIRI().get());
}