MuleMessage msg = new DefaultMuleMessage("test", muleContext);
msg.setEncoding("UTF-8");
msg.setCorrelationId("1234");
msg.setInvocationProperty("number", 1);
msg.setOutboundProperty("object", new Apple());
msg.setOutboundProperty("string", "hello");
String xml = (String) t1.transform(msg);
assertNotNull(xml);
XmlToObject t2 = createObject(XmlToObject.class);
Object result = t2.transform(xml);
assertNotNull(result);
assertTrue(result instanceof MuleMessage);
msg = (MuleMessage) result;
assertEquals("test", msg.getPayloadAsString());
assertEquals(new Apple(), msg.getOutboundProperty("object"));
//with different case
assertEquals(new Apple(), msg.getOutboundProperty("oBjeCt"));
//Make sure we don't have the property in a different scope
assertNull(msg.getInboundProperty("oBjeCt"));
assertNull(msg.getInvocationProperty("oBjeCt"));
assertNull(msg.getSessionProperty("oBjeCt"));