@Test
public void testMarshalAndUnmarshalMap() throws Exception {
Map<String, Object> in = new HashMap<String, Object>();
in.put("name", "Camel");
MockEndpoint mock = getMockEndpoint("mock:reverse");
mock.expectedMessageCount(1);
mock.message(0).body().isInstanceOf(Map.class);
mock.message(0).body().equals(in);
Object marshalled = template.requestBody("direct:in", in);
String marshalledAsString = context.getTypeConverter().convertTo(String.class, marshalled);
assertEquals("{\"name\":\"Camel\"}", marshalledAsString);
template.sendBody("direct:back", marshalled);
mock.assertIsSatisfied();
}