@Test
public void testBuildBeanForOutput() throws Exception {

	String xml = "<s:extensions xmlns:s=\"http://org.embl.ebi.escience/xscufl/0.1alpha\"><s:complextype optional=\"false\" unbounded=\"false\" typename=\"getPersonResponse\" name=\"parameters\" qname=\"{http://testing.org}getPersonResponse\"><s:elements><s:complextype optional=\"false\" unbounded=\"false\" typename=\"Person\" name=\"getPersonReturn\" qname=\"{http://testing.org}&gt;getPersonResponse&gt;getPersonReturn\"><s:elements><s:complextype optional=\"false\" unbounded=\"false\" typename=\"Address\" name=\"address\" qname=\"{http://testing.org}Person&gt;address\"><s:elements><s:basetype optional=\"false\" unbounded=\"false\" typename=\"string\" name=\"city\" qname=\"{http://testing.org}Address&gt;city\" /><s:basetype optional=\"false\" unbounded=\"false\" typename=\"int\" name=\"number\" qname=\"{http://testing.org}Address&gt;number\" /><s:basetype optional=\"false\" unbounded=\"false\" typename=\"string\" name=\"road\" qname=\"{http://testing.org}Address&gt;road\" /></s:elements></s:complextype><s:basetype optional=\"false\" unbounded=\"false\" typename=\"int\" name=\"age\" qname=\"{http://testing.org}Person&gt;age\" /><s:basetype optional=\"false\" unbounded=\"false\" typename=\"string\" name=\"name\" qname=\"{http://testing.org}Person&gt;name\" /></s:elements></s:complextype></s:elements></s:complextype></s:extensions>";
	Element element = new SAXBuilder().build(new StringReader(xml)).getRootElement();
	JsonNode bean = XMLSplitterConfigurationBeanBuilder.buildBeanForOutput(element);
	assertNotNull("The bean should not be null",bean);
	assertEquals("There should be 1 input",1,bean.get("inputPorts").size());
	assertEquals("There should be 1 output",1,bean.get("outputPorts").size());
	assertEquals("The input should be named input","input",bean.get("inputPorts").get(0).get("name").textValue());
	assertEquals("The output shouldbe named getPersonResponse","getPersonReturn",bean.get("outputPorts").get(0).get("name").textValue());
	assertEquals("The type xml definition should match",xml,bean.get("wrappedType").textValue());
}