}
public void testMapHeadersWithGenerics() throws Exception
{
props.put("apple", new Apple());
props.put("banana", new Banana());
props.put("orange", new Orange());
MuleClient client = new MuleClient(muleContext);
MuleMessage message = client.send("vm://headersWithGenerics", null, props);
assertNotNull("return message from MuleClient.send() should not be null", message);
assertTrue("Message payload should be a Map", message.getPayload() instanceof Map);
Map<?, ?> result = (Map<?, ?>) message.getPayload();
//Will match all Mule headers
assertEquals(2, result.size());
assertEquals(new Apple(), result.get("apple"));
assertEquals(new Orange(), result.get("orange"));
assertNull(result.get("banana"));
}