List receivedDonuts = Arrays.asList(m_consumers[i].getAllDonuts());
assertEquals(
"The number of received donuts must be the same as the number of sent donuts.",
sentDonuts.size(), receivedDonuts.size());
assertTrue("The receiver must have eaten all sent donuts.",
receivedDonuts.containsAll(sentDonuts));
}
}
/**
* Test the synchronism of event sending for the component.