@Test
public void testOwlapiDatatype() throws Exception {

    String datatypeStr = "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral";
    Datatype datatype = mock(Datatype.class);
    IRI datatypeIRI = mock(IRI.class);
    org.semanticweb.owlapi.model.IRI owlDatatypeIRI = org.semanticweb.owlapi.model.IRI.create(datatypeStr);
    expect(datatype.getIRI()).andReturn(datatypeIRI).anyTimes();
    expect(datatypeIRI.stringValue()).andReturn(datatypeStr).anyTimes();
    mockStaticPartial(SimpleOntologyValues.class, "owlapiIRI");
    expect(SimpleOntologyValues.owlapiIRI(datatypeIRI)).andReturn(owlDatatypeIRI).anyTimes();
    replay(datatype, datatypeIRI, SimpleOntologyValues.class);
    assertEquals(owlDatatypeIRI, SimpleOntologyValues.owlapiDatatype(datatype).getIRI());
}