int nrMessages = 3;
for (int i = 0; i < nrMessages; i++)
{
client.dispatch("vm://flow.in", "some data " + i, null);
}
flowExecutionListener.waitUntilFlowIsComplete();
// Receive 2 messages
for (int i = 0; i < 2; i++)
{
MuleMessage result = client.request("vm://flow.out", RECEIVE_TIMEOUT);
assertNotNull(result);