message.setHeader("foo", 123);
String out = MessageHelper.dumpAsXml(message);
assertTrue("Should contain body", out.contains("<body type=\"java.lang.String\">Hello World</body>"));
context.stop();
}
<BUG>public void testDumpAsXmlXmlBody() throws Exception {
CamelContext context = new DefaultCamelContext();</BUG>
context.start();
message = new DefaultExchange(context).getIn();
message.setBody("<?xml version=\"1.0\"?><hi>Hello World</hi>");

message.setHeader("foo", 123);
String out = MessageHelper.dumpAsXml(message);
assertTrue("Should contain body", out.contains("<body type=\"java.lang.String\">Hello World</body>"));
context.stop();
}
public void testDumpAsXmlBody() throws Exception {
CamelContext context = new DefaultCamelContext();
context.start();
message = new DefaultExchange(context).getIn();
message.setBody("<?xml version=\"1.0\"?><hi>Hello World</hi>");
