### Question:
WSDLImporter implements XMLImporter { public void importFrom(Import theImport, String sourceSystemId) { this.namespace = theImport.getNamespace() == null ? "" : theImport.getNamespace() + ":"; this.importFrom(theImport.getLocation()); } WSDLImporter(); void importFrom(Import theImport, String sourceSystemId); void importFrom(String url); Map<String, StructureDefinition> getStructures(); Map<String, WSService> getServices(); Map<String, WSOperation> getOperations();  }### Answer:
@Test public void testImportInheritedElement() throws Exception { URL url = ReflectUtil.getResource("org/activiti/engine/impl/webservice/inherited-elements-in-types.wsdl"); assertNotNull(url); importer.importFrom(url.toString()); List<StructureDefinition> structures = sortStructures(); assertEquals(1, structures.size()); final Object structureTypeInst = ReflectUtil.instantiate("org.activiti.webservice.counter.StructureType"); final Class<? extends Object> structureType = structureTypeInst.getClass(); this.assertStructure(structures.get(0), "inheritedRequest", new String[] { "rootElt", "inheritedElt", "newSimpleElt", "newStructuredElt" }, new Class<?>[] { Short.class, Integer.class, String.class, structureType }); assertEquals(2, structureType.getDeclaredFields().length); assertNotNull(structureType.getDeclaredField("booleanElt")); assertNotNull(structureType.getDeclaredField("dateElt")); assertEquals(1, structureType.getSuperclass().getDeclaredFields().length); assertNotNull(structureType.getSuperclass().getDeclaredField("rootElt")); }
@Test public void testImportBasicElement() throws Exception { URL url = ReflectUtil.getResource("org/activiti/engine/impl/webservice/basic-elements-in-types.wsdl"); assertNotNull(url); importer.importFrom(url.toString()); }
@Test public void testComplexTypeMixed() throws Exception { URL url = ReflectUtil.getResource("org/activiti/engine/impl/webservice/complexType-mixed.wsdl"); importer.importFrom(url.toString()); }