### Question:
WSDLToJavaContainer extends AbstractCXFToolContainer { public void validate(ToolContext env) throws ToolException { String outdir = (String)env.get(ToolConstants.CFG_OUTPUTDIR); if (!isSuppressCodeGen()) { if (outdir != null) { File dir = new File(outdir); if (!dir.exists() && !dir.mkdirs()) { Message msg = new Message("DIRECTORY_COULD_NOT_BE_CREATED", LOG, outdir); throw new ToolException(msg); } if (!dir.isDirectory()) { Message msg = new Message("NOT_A_DIRECTORY", LOG, outdir); throw new ToolException(msg); } } if (env.optionSet(ToolConstants.CFG_COMPILE)) { String clsdir = (String)env.get(ToolConstants.CFG_CLASSDIR); if (clsdir != null) { File dir = new File(clsdir); if (!dir.exists() && !dir.mkdirs()) { Message msg = new Message("DIRECTORY_COULD_NOT_BE_CREATED", LOG, clsdir); throw new ToolException(msg); } } } } String wsdl = (String)env.get(ToolConstants.CFG_WSDLURL); if (StringUtils.isEmpty(wsdl)) { Message msg = new Message("NO_WSDL_URL", LOG); throw new ToolException(msg); } env.put(ToolConstants.CFG_WSDLURL, URIParserUtil.getAbsoluteURI(wsdl)); if (!env.containsKey(ToolConstants.CFG_WSDLLOCATION)) { boolean assumeFileURI = false; try { URI uri = new URI(wsdl); String uriScheme = uri.getScheme(); if (uriScheme == null) { assumeFileURI = true; } wsdl = uri.toString(); } catch (Exception e) { assumeFileURI = true; } if (assumeFileURI) { if (wsdl.indexOf(':') != -1 && !wsdl.startsWith("/")) { wsdl = "file:/" + wsdl; } else { wsdl = "file:" + wsdl; } try { URI uri = new URI(wsdl); wsdl = uri.toString(); } catch (Exception e1) { } } wsdl = wsdl.replace("\\", "/"); env.put(ToolConstants.CFG_WSDLLOCATION, wsdl); } String[] bindingFiles; try { bindingFiles = (String[])env.get(ToolConstants.CFG_BINDING); if (bindingFiles == null) { return; } } catch (ClassCastException e) { bindingFiles = new String[1]; bindingFiles[0] = (String)env.get(ToolConstants.CFG_BINDING); } for (int i = 0; i < bindingFiles.length; i++) { bindingFiles[i] = URIParserUtil.getAbsoluteURI(bindingFiles[i]); } env.put(ToolConstants.CFG_BINDING, bindingFiles); } 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 testWsdlLocationDefaultSchemeIsFile() throws Exception { WSDLToJavaContainer container = new WSDLToJavaContainer("dummy", null); ToolContext context = new ToolContext(); context.put(ToolConstants.CFG_WSDLURL, getLocation("hello_world.wsdl")); container.setContext(context); container.validate(context); String wsdlLocation = (String)context.get(ToolConstants.CFG_WSDLLOCATION); assertTrue("default scheme for wsdlLocation is file", wsdlLocation.startsWith("file:")); }