### Question:
DOValidatorXMLSchema implements Constants, EntityResolver { public void validate(File objectAsFile) throws ObjectValidityException, GeneralException { try { validate(new StreamSource(new FileInputStream(objectAsFile))); } catch (IOException e) { String msg = "DOValidatorXMLSchema returned error.\n" + "The underlying exception was a " + e.getClass().getName() + ".\n" + "The message was " + "\"" + e.getMessage() + "\""; throw new GeneralException(msg); } } DOValidatorXMLSchema(Schema schema);  DOValidatorXMLSchema(String schemaPath); void validate(File objectAsFile); void validate(InputStream objectAsStream); InputSource resolveEntity(String publicId, String systemId);  }### Answer:
@Test public void testFoxmlValidation() throws Exception { InputStream in = new FileInputStream(RESOURCES + "demo/demo-objects/foxml/local-server-demos/simple-image-demo/obj_demo_5.xml"); DOValidatorXMLSchema dov = new DOValidatorXMLSchema(RESOURCES + "xsd/foxml1-1.xsd"); dov.validate(in); }
@Test public void testMetsValidation() throws Exception { InputStream in = new FileInputStream(getDemoFile("mets/local-server-demos/simple-image-demo/obj_demo_5.xml")); DOValidatorXMLSchema dov = new DOValidatorXMLSchema(RESOURCES + "xsd/mets-fedora-ext1-1.xsd"); dov.validate(in); }
@Test public void testAtomValidation() throws Exception { InputStream in = new FileInputStream(getDemoFile("atom/local-server-demos/simple-image-demo/obj_demo_5.xml")); DOValidatorXMLSchema dov = new DOValidatorXMLSchema(RESOURCES + "xsd/atom.xsd"); dov.validate(in); }