Object marshalled = template.requestBody("direct:unmarshalInlineOptions", in);
Document document = context.getTypeConverter().convertTo(Document.class, marshalled);
assertEquals("The XML document doesn't carry newRoot as the root name", "newRoot", document.getDocumentElement().getLocalName());
assertEquals("The number of direct child elements of newRoot with tag d (expandable property) is not 3", 3, document.getDocumentElement().getElementsByTagName("d").getLength());
assertEquals("The number of direct child elements of newRoot with tag e (expandable property) is not 3", 3, document.getDocumentElement().getElementsByTagName("e").getLength());
mockXML.assertIsSatisfied();
}
@Test
public void testJsonArraysToXml() throws Exception {
MockEndpoint mockXML = getMockEndpoint("mock:xmlInlineOptionsArray");