### Question:
WSDLToJavaContainer extends AbstractCXFToolContainer { public void execute() throws ToolException { if (hasInfoOption()) { return; } buildToolContext(); boolean isWsdlList = context.optionSet(ToolConstants.CFG_WSDLLIST); if (isWsdlList) { try { ToolContext initialContextState = context.makeCopy(); String wsdlURL = (String)context.get(ToolConstants.CFG_WSDLURL); wsdlURL = URIParserUtil.getAbsoluteURI(wsdlURL); URL url = new URL(wsdlURL); InputStream is = (InputStream)url.getContent(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(is))) { String tempLine = null; while ((tempLine = reader.readLine()) != null) { ToolContext freshContext = initialContextState.makeCopy(); freshContext.put(ToolConstants.CFG_WSDLURL, tempLine); setContext(freshContext); buildToolContext(); processWsdl(); } if (context.getErrorListener().getErrorCount() > 0) { context.getErrorListener().throwToolException(); } } } catch (IOException e) { throw new ToolException(e); } } else { processWsdl(); if (context.getErrorListener().getErrorCount() > 0) { context.getErrorListener().throwToolException(); } } } WSDLToJavaContainer(String name, ToolSpec toolspec); Set<String> getArrayKeys(); WSDLConstants.WSDLVersion getWSDLVersion(); void execute(); void execute(boolean exitOnFinish); @SuppressWarnings("unchecked") QName getServiceQName(Definition def); void loadDefaultNSPackageMapping(ToolContext env); void setExcludePackageAndNamespaces(ToolContext env); void setPackageAndNamespaces(ToolContext env); void validate(ToolContext env); void setAntProperties(ToolContext env); void buildToolContext(); void checkParams(ErrorVisitor errors); void removeExcludeFiles(); boolean passthrough(); void generateTypes(); void validate(final ServiceInfo service); List<ServiceValidator> getServiceValidators();  }### Answer:
@Test public void testNoPlugin() throws Exception { WSDLToJavaContainer container = new WSDLToJavaContainer("dummy", null); ToolContext context = new ToolContext(); context.put(ToolConstants.CFG_WSDLURL, getLocation("hello_world.wsdl")); container.setContext(context); try { container.execute(); } catch (ToolException te) { assertEquals(getLogMessage("FOUND_NO_FRONTEND"), te.getMessage()); } catch (Exception e) { fail("Should not throw any exception but ToolException."); } }
@Test public void testValidateorSuppressWarningsIsOn() throws Exception { WSDLToJavaContainer container = new WSDLToJavaContainer("dummy", null); ToolContext context = new ToolContext(); context.put(ToolConstants.CFG_WSDLURL, getLocation("hello_world.wsdl")); container.setContext(context); try { container.execute(); } catch (ToolException te) { assertEquals(getLogMessage("FOUND_NO_FRONTEND"), te.getMessage()); } catch (Exception e) { fail("Should not throw any exception but ToolException."); } assertTrue(context.optionSet(ToolConstants.CFG_SUPPRESS_WARNINGS)); }