DatatypeFactory { public static DatatypeFactory getInstance(Configuration configuration) throws ValidationException { return new DatatypeFactory(configuration.getConversionRules()); } @SuppressWarnings("OverridableMethodCallInConstructor") private  DatatypeFactory(ConversionRules conversionRules); Datatype getDatatype(QName qn); static DatatypeFactory getInstance(Configuration configuration); static final String NS_XSD; final Datatype XS_STRING; }
@Test public void getInstanceTest() throws ValidationException { Configuration config = Configuration.newConfiguration(); DatatypeFactory factory = DatatypeFactory.getInstance(config); assertNotNull("Datatype factory instance is null", factory); DatatypeFactory factory2 = DatatypeFactory.getInstance(config); assertNotEquals("two instances return are equals", factory, factory2); }