### Question:
WSDLValidator { static int executeValidator(String wsdlUrl) { try { ToolContext env = new ToolContext(); env.put(ToolConstants.CFG_WSDLURL, wsdlUrl); final WSDL11Validator validator = new WSDL11Validator(null, env); if (validator.isValid()) { System.out.println("Passed Validation : Valid WSDL "); return 0; } } catch (Exception ex) { System.err.println("WSDLValidator Error : " + ex.getMessage()); } return 1; } private  WSDLValidator(); static void main(String[] args);  }### Answer:
@Test public void shouldFailValidation() { assertEquals(1, WSDLValidator.executeValidator("src/test/resources/error.wsdl")); }
@Test public void shouldPassValidation() { assertEquals(0, WSDLValidator.executeValidator("src/test/resources/testservice.wsdl")); }