SimpleOntologyValues { public static Datatype mobiDatatype(OWLDatatype datatype) { if (datatype == null) { return null; } else { return new SimpleDatatype(datatype); } } SimpleOntologyValues(); @Activate void activate(); @Deactivate void deactivate(); static OWLOntology owlapiOntology(Ontology ontology); static IRI mobiIRI(org.semanticweb.owlapi.model.IRI owlIri); static org.semanticweb.owlapi.model.IRI owlapiIRI(IRI mobiIri); static Literal mobiLiteral(OWLLiteral owlLiteral); static OWLLiteral owlapiLiteral(Literal literal); static Annotation mobiAnnotation(OWLAnnotation owlAnno); static OWLAnnotation owlapiAnnotation(Annotation anno); static Individual mobiIndividual(OWLIndividual owlapiIndividual); static OWLNamedIndividual owlapiIndividual(Individual mobiIndividual); static OntologyId mobiOntologyId(OWLOntologyID owlId); static OWLOntologyID owlapiOntologyId(OntologyId simpleId); static OClass mobiClass(OWLClass owlapiClass); static OWLClass owlapiClass(OClass mobiClass); static Datatype mobiDatatype(OWLDatatype datatype); static OWLDatatype owlapiDatatype(Datatype datatype); static ObjectProperty mobiObjectProperty(OWLObjectProperty property); static OWLObjectProperty owlapiObjectProperty(ObjectProperty property); static DataProperty mobiDataProperty(OWLDataProperty property); static OWLDataProperty owlapiDataProperty(DataProperty property); static AnnotationProperty mobiAnnotationProperty(OWLAnnotationProperty property); static OWLAnnotationProperty owlapiAnnotationProperty(AnnotationProperty property);  }
@Test public void testMobiDatatype() throws Exception { OWLDatatype owlDatatype = mock(OWLDatatype.class); org.semanticweb.owlapi.model.IRI owlDatatypeIRI = mock(org.semanticweb.owlapi.model.IRI.class); IRI datatypeIRI = mock(IRI.class); expect(owlDatatype.getIRI()).andReturn(owlDatatypeIRI).anyTimes(); expect(owlDatatype.isBuiltIn()).andReturn(true).anyTimes(); expect(datatypeIRI.stringValue()).andReturn("http: mockStaticPartial(SimpleOntologyValues.class, "mobiIRI", "owlapiIRI"); expect(SimpleOntologyValues.mobiIRI(owlDatatypeIRI)).andReturn(datatypeIRI).anyTimes(); expect(SimpleOntologyValues.owlapiIRI(datatypeIRI)).andReturn(owlDatatypeIRI).anyTimes(); mockStaticPartial(org.semanticweb.owlapi.model.IRI.class, "create"); expect(org.semanticweb.owlapi.model.IRI.create(isA(String.class), isA(String.class))).andReturn(owlDatatypeIRI).anyTimes(); replay(owlDatatype, owlDatatypeIRI, datatypeIRI, SimpleOntologyValues.class, org.semanticweb.owlapi.model.IRI.class); assertEquals(datatypeIRI, SimpleOntologyValues.mobiDatatype(owlDatatype).getIRI()); }