}
public void testCustomTransform() throws Exception
{
MuleMessage message = new DefaultMuleMessage(PERSON_XML, muleContext);
Person person = message.getPayload(DataTypeFactory.create(Person.class));
assertNotNull(person);
assertEquals("John Doe", person.getName());
assertEquals("01/01/1970", person.getDob());
assertEquals(2, person.getEmailAddresses().size());
assertEquals("home", person.getEmailAddresses().get(0).getType());
assertEquals("john.doe@gmail.com", person.getEmailAddresses().get(0).getAddress());
assertEquals("work", person.getEmailAddresses().get(1).getType());
assertEquals("jdoe@bigco.com", person.getEmailAddresses().get(1).getAddress());
}