### Question:
WSDLRefValidator extends AbstractDefinitionValidator { public boolean isValid() { try { loadServices(); collectValidationPoints(); List<Document> wsdlDocs = getWSDLDocuments(); for (XNode vNode : vNodes) { if (!isExist(wsdlDocs, vNode)) { FailureLocation loc = getFailureLocation(wsdlDocs, vNode.getFailurePoint()); vResults.addError(new Message("FAILED_AT_POINT", LOG, loc.getLocation().getLineNumber(), loc.getLocation().getColumnNumber(), loc.getDocumentURI(), vNode.getPlainText())); } } } catch (Exception e) { this.vResults.addError(e.getMessage()); return false; } return vResults.isSuccessful(); } WSDLRefValidator(Definition wsdl, Document doc);  WSDLRefValidator(Definition wsdl, Document doc, Bus bus); void setSuppressWarnings(boolean s); ValidationResult getValidationResults(); boolean isValid(); String getErrorMessage(); Definition getDefinition();  }### Answer:
@Test public void testWSDLImport2() throws Exception { String wsdl = getClass().getResource("resources/physicalpt.wsdl").toURI().toString(); WSDLRefValidator validator = new WSDLRefValidator(getWSDL(wsdl), null); assertTrue(validator.isValid()); String expected = "/wsdl:definitions[@targetNamespace='http: + "/wsdl:portType[@name='foo.bar']"; Set<String> xpath = new HashSet<>(); for (XNode node : validator.vNodes) { xpath.add(node.toString()); } assertTrue(xpath.contains(expected)); }
@Test public void testWSDLImport2() throws Exception { String wsdl = getClass().getResource("resources/physicalpt.wsdl").toURI().toString(); WSDLRefValidator validator = new WSDLRefValidator(getWSDL(wsdl), null); assertTrue(validator.isValid()); String expected = "/wsdl:definitions[@targetNamespace='http: + "/wsdl:portType[@name='foo.bar']"; Set<String> xpath = new HashSet<String>(); for (XNode node : validator.vNodes) { xpath.add(node.toString()); } assertTrue(xpath.contains(expected)); }