### Question:
WSDLManagerImpl implements WSDLManager { public Definition getDefinition(String url) throws WSDLException { synchronized (definitionsMap) { if (definitionsMap.containsKey(url)) { return definitionsMap.get(url); } } Definition def = loadDefinition(url); synchronized (definitionsMap) { definitionsMap.put(url, def); } return def; } WSDLManagerImpl(); private  WSDLManagerImpl(Bus b); @Resource final void setBus(Bus b); WSDLFactory getWSDLFactory(); Map<Object, Definition> getDefinitions(); ExtensionRegistry getExtensionRegistry(); Definition getDefinition(String url); Definition getDefinition(final Element el); void addDefinition(Object key, Definition wsdl); void setXMLStreamReaderWrapper(XMLStreamReaderWrapper wrapper); ServiceSchemaInfo getSchemasForDefinition(Definition wsdl); void putSchemasForDefinition(Definition wsdl, ServiceSchemaInfo schemas); boolean isDisableSchemaCache(); void setDisableSchemaCache(boolean disableSchemaCache); @Override void removeDefinition(Definition wsdl); @Override void removeDefinition(String url);  }### Answer:
@Test public void testBuildSimpleWSDL() throws Exception { String qname = "http: String wsdlUrl = getClass().getResource("hello_world.wsdl").toString(); WSDLManager builder = new WSDLManagerImpl(); Definition def = builder.getDefinition(wsdlUrl); assertNotNull(def); Map<?, ?> services = def.getServices(); assertNotNull(services); assertEquals(1, services.size()); Service service = (Service)services.get(new QName(qname, "SOAPService")); assertNotNull(service); Map<?, ?> ports = service.getPorts(); assertNotNull(ports); assertEquals(1, ports.size()); Port port = service.getPort("SoapPort"); assertNotNull(port); }
@Test public void testBuildImportedWSDL() throws Exception { String wsdlUrl = getClass().getResource("hello_world_services.wsdl").toString(); WSDLManager builder = new WSDLManagerImpl(); Definition def = builder.getDefinition(wsdlUrl); assertNotNull(def); Map<?, ?> services = def.getServices(); assertNotNull(services); assertEquals(1, services.size()); String serviceQName = "http: Service service = (Service)services.get(new QName(serviceQName, "SOAPService")); assertNotNull(service); Map<?, ?> ports = service.getPorts(); assertNotNull(ports); assertEquals(1, ports.size()); Port port = service.getPort("SoapPort"); assertNotNull(port); Binding binding = port.getBinding(); assertNotNull(binding); QName bindingQName = new QName("http: assertEquals(bindingQName, binding.getQName()); PortType portType = binding.getPortType(); assertNotNull(portType); QName portTypeQName = new QName("http: assertEquals(portTypeQName, portType.getQName()); Operation op1 = portType.getOperation("sayHi", "sayHiRequest", "sayHiResponse"); assertNotNull(op1); QName messageQName = new QName("http: assertEquals(messageQName, op1.getInput().getMessage().getQName()); Part part = op1.getInput().getMessage().getPart("in"); assertNotNull(part); assertEquals(new QName("http: }