@Test
public void testOptional() throws Exception {

	WSDLParser parser = new WSDLParser(wsdlResourcePath("VSOi.wsdl"));
	TypeDescriptor descriptor = parser.getOperationInputParameters("Query").get(0);
	XMLInputSplitter splitter = new XMLInputSplitter(descriptor,new String[]{"version","block"},new String[]{"text/plain","text/plain"},new String[]{"output"});
	Map<String,Object> inputMap = new HashMap<String, Object>();
	// connect none of the inputs
	Map<String,String> outputMap = splitter.execute(inputMap);
	assertNotNull("there should be an output named 'output'",outputMap.containsKey("output"));
	String xml = outputMap.get("output");
	// empty string as <block> as it is not nillable
	assertTrue(xml.contains("<block xmlns=\"\"></block>"));
	// minOccurs=0 - so it should not be there
	assertTrue(! xml.contains("<version>"));
}