SchemaFactoryImpl extends SchemaFactory2 { public void setProperty(String name, Object object) throws SAXNotRecognizedException, SAXNotSupportedException { if (PROPERTY_DATATYPE_LIBRARY_FACTORY.equals(name)) { if (object instanceof DatatypeLibraryFactory) { datatypeLibraryFactory = (DatatypeLibraryFactory)object; defaultDatatypeLibraryFactory = false; } else throw new SAXNotSupportedException("value of \"" + PROPERTY_DATATYPE_LIBRARY_FACTORY + "\" property does not implement org.relaxng.datatype.DatatypeLibraryFactory"); } else super.setProperty(name, object); } protected  SchemaFactoryImpl(); Schema2 newSchema(SAXSource source); void setProperty(String name, Object object); Object getProperty(String name); static final public String PROPERTY_DATATYPE_LIBRARY_FACTORY; }
@Test(expectedExceptions = { SAXNotRecognizedException.class }) public void testUnrecognizedSetProperty() throws SAXNotRecognizedException, SAXNotSupportedException { SchemaFactory f = factory(); f.setProperty("http: throw new AssertionError(); }