@Test
public void testGetTypeDescriptorForInputPort() throws Exception {

	String xml = "<s:extensions xmlns:s=\"http://org.embl.ebi.escience/xscufl/0.1alpha\"><s:complextype optional=\"false\" unbounded=\"false\" typename=\"personToString\" name=\"parameters\" qname=\"{http://xfire.codehaus.org/BookService}personToString\"><s:elements><s:complextype optional=\"false\" unbounded=\"false\" typename=\"Person\" name=\"person\" qname=\"{http://xfire.codehaus.org/BookService}&gt;personToString&gt;person\"><s:elements><s:complextype optional=\"true\" unbounded=\"false\" typename=\"Address\" name=\"address\" qname=\"{http://complex.pojo.axis2.menagerie.googlecode}Person&gt;address\"><s:elements><s:basetype optional=\"true\" unbounded=\"false\" typename=\"string\" name=\"city\" qname=\"{http://complex.pojo.axis2.menagerie.googlecode}Address&gt;city\" /><s:basetype optional=\"true\" unbounded=\"false\" typename=\"string\" name=\"road\" qname=\"{http://complex.pojo.axis2.menagerie.googlecode}Address&gt;road\" /><s:basetype optional=\"true\" unbounded=\"false\" typename=\"int\" name=\"roadNumber\" qname=\"{http://complex.pojo.axis2.menagerie.googlecode}Address&gt;roadNumber\" /></s:elements></s:complextype><s:basetype optional=\"true\" unbounded=\"false\" typename=\"int\" name=\"age\" qname=\"{http://complex.pojo.axis2.menagerie.googlecode}Person&gt;age\" /><s:basetype optional=\"true\" unbounded=\"false\" typename=\"string\" name=\"firstName\" qname=\"{http://complex.pojo.axis2.menagerie.googlecode}Person&gt;firstName\" /><s:basetype optional=\"true\" unbounded=\"false\" typename=\"string\" name=\"lastName\" qname=\"{http://complex.pojo.axis2.menagerie.googlecode}Person&gt;lastName\" /></s:elements></s:complextype></s:elements></s:complextype></s:extensions>";
	Element element = new SAXBuilder().build(new StringReader(xml)).getRootElement();
	JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForInput(element);
	XMLInputSplitterActivity a = new XMLInputSplitterActivity();
	a.configure(bean);
	XMLInputSplitterActivityFactory af = new XMLInputSplitterActivityFactory();
	af.setEdits(new EditsImpl());
	boolean exists = false;
	for (ActivityInputPort p : af.getInputPorts(bean)) {
		if (p.getName().equals("person")) {
			exists=true;
			break;
		}
	}
	assertTrue("The input port named person should have been found",exists);
	assertNotNull("There should be a type descriptor for person",a.getTypeDescriptorForInputPort("person"));
	assertTrue("The descriptor should be complex",a.getTypeDescriptorForInputPort("person") instanceof ComplexTypeDescriptor);
}