public void testUnmarshalToXMLInlineOptions() throws Exception {
InputStream inStream = getClass().getResourceAsStream("testMessage1.json");
String in = context.getTypeConverter().convertTo(String.class, inStream);
MockEndpoint mockXML = getMockEndpoint("mock:xmlInlineOptions");
mockXML.expectedMessageCount(1);
mockXML.message(0).body().isInstanceOf(String.class);
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());