SchemaFactoryBuilder extends AbstractFactoryBuilder<SchemaFactory> { public SchemaFactory build() { SchemaFactory sf = SchemaFactory.newInstance(schemaLanguage); setSecurityFeatures(sf); setSecurityAttributes(sf); return sf; } private  SchemaFactoryBuilder(); static SchemaFactoryBuilder getSecureSchemaBuilder(); SchemaFactory build(); void setSchemaLanguage(String schemaLanguage); @Override SchemaFactoryBuilder enableFeature(String feature); @Override SchemaFactoryBuilder disableFeature(String feature); @Override SchemaFactoryBuilder setAttribute(String attribute, Object value); @Override SchemaFactoryBuilder removeAttribute(String attribute);  }
@Test public void buildTest() { SchemaFactoryBuilder schemaBuilder = SchemaFactoryBuilder.getSecureSchemaBuilder(); SchemaFactory schemaFactory = schemaBuilder.build(); assertNotNull(schemaFactory); }