}
public void testRequestWithComplexArg() throws Exception
{
MuleClient client = new MuleClient(muleContext);
Person person = new Person("Joe", "Blow");
String uri = getMuleAddress(client, "inMyComponent3") + "/mycomponent3?method=addPerson";
client.send(uri, person, null);
uri = getMuleAddress(client, "inMyComponent3") + "/mycomponent3?method=getPerson";
MuleMessage result = client.send(uri, "Joe", null);
assertNotNull(result);
assertTrue(result.getPayload() instanceof Person);
assertEquals("Joe", ((Person)result.getPayload()).getFirstName());
assertEquals("Blow", ((Person)result.getPayload()).getLastName());
}