OntModel model = ModelFactory.createOntologyModel( PelletReasonerFactory.THE_SPEC );
Property p = model.createAnnotationProperty( ns + "p" );
model.prepare();
assertTrue(model.contains(p, RDF.type, OWL.AnnotationProperty));
assertIteratorContains( model.listObjectsOfProperty( p, RDF.type ), OWL.AnnotationProperty );
assertIteratorContains( model.listObjectsOfProperty( p, null ), OWL.AnnotationProperty );
assertTrue(model.contains(RDFS.label, RDF.type, OWL.AnnotationProperty));
assertIteratorContains( model.listObjectsOfProperty( RDFS.label, RDF.type ), OWL.AnnotationProperty );
assertIteratorContains( model.listObjectsOfProperty( RDFS.label, null ), OWL.AnnotationProperty );