model.prepare();
OntClass C = model.getOntClass( ns + "C" );
OntClass D = model.getOntClass( ns + "D" );
ObjectProperty r = model.getObjectProperty( ns + "r" );
OntModel posit = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );
Resource invR = posit.createResource();
invR.addProperty( OWL.inverseOf, r );
Resource restr = posit.createResource();
restr.addProperty( OWL.onProperty, invR );
restr.addProperty( OWL.someValuesFrom, D );
assertTrue( model.listStatements( C, RDFS.subClassOf, restr, posit ).hasNext() );
assertTrue( model.contains( model.getProperty( ns + "functionalP" ), RDF.type,
OWL.InverseFunctionalProperty ) );
assertTrue( model.contains( model.getProperty( ns + "inverseFunctionalP" ), RDF.type,
OWL.FunctionalProperty ) );
assertTrue( model.contains( model.getProperty( ns + "transitiveP" ), RDF.type,
OWL.TransitiveProperty ) );
assertTrue( model.contains( model.getProperty( ns + "symmetricP" ), RDF.type,
OWL.SymmetricProperty ) );
assertTrue( model.contains( model.getProperty( ns + "reflexiveP" ), RDF.type,
OWL2.ReflexiveProperty ) );
assertTrue( model.contains( model.getProperty( ns + "irreflexiveP" ), RDF.type,
OWL2.IrreflexiveProperty ) );
assertTrue( model.contains( model.getProperty( ns + "asymmetricP" ), RDF.type,
OWL2.AsymmetricProperty ) );
ObjectProperty p1 = model.getObjectProperty( ns + "p1" );
ObjectProperty p2 = model.getObjectProperty( ns + "p2" );
ObjectProperty p3 = model.getObjectProperty( ns + "p3" );
assertTrue( model.contains( p1, OWL.equivalentProperty, p2 ) );
assertTrue( model.contains( p1, OWL.equivalentProperty, p3 ) );
assertTrue( model.contains( p2, OWL.equivalentProperty, p3 ) );
}