assertEquals("String", em.getOutBodyType());
assertEquals("{cheese=789}", em.getOutHeaders());
}
public void testDefaultTraceEventMessageBody() throws Exception {
Exchange exchange = new DefaultExchange(context);
exchange.getIn().setBody(new File("target/test"));
DefaultTraceEventMessage em = new DefaultTraceEventMessage(new Date(), null, exchange);
assertEquals("Get a wrong body string", "[Body is file based: target/test]", em.getBody());
exchange.getIn().setBody(new ByteArrayInputStream("target/test".getBytes()));
em = new DefaultTraceEventMessage(new Date(), null, exchange);
assertEquals("Get a wrong body string", "[Body is instance of java.io.InputStream]", em.getBody());
}