" </element>" +
"</info>");
XMLIntrospector introspector = new XMLIntrospector();
XMLBeanInfo xmlBeanInfo = introspector.introspect(SimpleTestBean.class, new InputSource(reader));
ElementDescriptor elementDescriptor = xmlBeanInfo.getElementDescriptor();
assertEquals("Root is jelly", "jelly", elementDescriptor.getLocalName());
ElementDescriptor[] childDescriptors = elementDescriptor.getElementDescriptors();
assertEquals("Expected two child elements", 2, childDescriptors.length);
assertEquals("Wibble comes first", "wibble", childDescriptors[0].getLocalName());
assertEquals("Wobble comes last", "wobble", childDescriptors[1].getLocalName());
reader = new StringReader(
"<?xml version='1.0' ?>" +
"<info>" +
" <element name='not-jelly'>" +
" <element name='no-wibble' property='alpha'/>" +
" <element name='no-wobble' property='beta'/>" +
" </element>" +
"</info>");
xmlBeanInfo = introspector.introspect(SimpleTestBean.class, new InputSource(reader));
elementDescriptor = xmlBeanInfo.getElementDescriptor();
assertEquals("Root is not-jelly", "not-jelly", elementDescriptor.getLocalName());
childDescriptors = elementDescriptor.getElementDescriptors();
assertEquals("Expected two child elements", 2, childDescriptors.length);
assertEquals("No wibble comes first", "no-wibble", childDescriptors[0].getLocalName());
assertEquals("No wobble comes last", "no-wobble", childDescriptors[1].getLocalName());
}