public void testCustomTransform() throws Exception
{
MuleMessage message = new DefaultMuleMessage(ITEM_JSON, muleContext);
Item item = (Item) message.getPayload(DataTypeFactory.create(Item.class));
assertNotNull(item);
assertEquals("1234", item.getCode());
assertEquals("Vacuum Cleaner", item.getDescription());
assertTrue(item.isInStock());
//and back again
message = new DefaultMuleMessage(item, muleContext);
String json = message.getPayload(DataType.STRING_DATA_TYPE);
assertNotNull(json);