Exchange exchange = createExchangeWithBody(new DefaultCamelContext(), "body");
Message out = new DefaultMessage();
out.setBody(new Object());
Processor processor = new UnmarshalProcessor(new MyDataFormat(out));
processor.process(exchange);
assertSame("UnmarshalProcessor did not make use of the returned OUT message", out, exchange.getOut());
assertSame("UnmarshalProcessor did change the body bound to the OUT message", out.getBody(), exchange.getOut().getBody());
}
public void testDataFormatReturnsBody() throws Exception {