### Question:
XMLValidatingParser { void validateAgainstXMLSchemaList(Document doc, List<SchemaSupplier> xsdList, ErrorHandler errHandler) throws SAXException, IOException { jlogger.fine("Validating XML resource from " + doc.getDocumentURI() + " with these specified schemas: " + xsdList); Schema schema; if (!xsdList.isEmpty()) { schema = schemaLoader.loadSchema(ImmutableList.copyOf(xsdList)); } else { schema = schemaLoader.defaultSchema(); } Validator validator = schema.newValidator(); validator.setErrorHandler(errHandler); DOMSource source = new DOMSource(doc, doc.getBaseURI()); validator.validate(source); } XMLValidatingParser();  XMLValidatingParser(Document schema_links); Document parse(URLConnection uc, Element instruction,
			PrintWriter logger); boolean checkXMLRules(Document doc, Document instruction); NodeList validate(Document doc, Document instruction); Element validateSingleResult(Document doc, Document instruction);  }### Answer:
@Test public void validateWithNullSchemaListAndNoSchemaLocation() throws SAXException, IOException { Document doc = parseResourceDocument("/ipo.xml"); XmlErrorHandler errHandler = new XmlErrorHandler(); XMLValidatingParser iut = new XMLValidatingParser(); iut.validateAgainstXMLSchemaList(doc, Collections.emptyList(), errHandler); assertFalse("Expected one or more validation errors.", errHandler.isEmpty()); }
@Test public void validateWithNullSchemaListAndSchemaLocation() throws SAXException, IOException, URISyntaxException { final Document doc = parseResourceDocument("/ipo-schemaLoc.xml"); XmlErrorHandler errHandler = new XmlErrorHandler(); XMLValidatingParser iut = new XMLValidatingParser(); iut.validateAgainstXMLSchemaList(doc, Collections.emptyList(), errHandler); List<String> errList = errHandler.toList(); assertEquals("Unexpected number of validation errors reported.", 0, errList.size()); }