RedApple redApple = new RedApple();
redApple.wash();
muleContext.getRegistry().registerObject("redApple", redApple);
muleContext.getRegistry().registerObject("anotherRedApple", new RedApple());
muleContext.getRegistry().registerObject("aBanana", new Banana());
InvocationResult response = invokeResolver("listFruit", eventContext);
assertTrue("Message payload should be a List", response.getResult() instanceof List);
List<Fruit> result = (List<Fruit>) response.getResult();
assertEquals(2, result.size());