OntModel ont = ModelFactory.createOntologyModel(spec);
Resource over12 = ont.createResource( over12Type.getURI() );
DatatypeProperty hasValue = ont.createDatatypeProperty(NS + "hasValue");
hasValue.addRange( over12 );
ont.createResource(NS + "a").addProperty(hasValue, "15", over12Type);
ont.createResource(NS + "b").addProperty(hasValue, "16", XSDDatatype.XSDinteger);
ont.createResource(NS + "c").addProperty(hasValue, "10", XSDDatatype.XSDinteger);
ValidityReport validity = ont.validate();
assertTrue (! validity.isValid());