// Public --------------------------------------------------------
public void testAllAccepting()
{
Router router = new RoundRobinPointToPointRouter();
final int numReceivers = 10;
SimpleReceiver[] receivers = new SimpleReceiver[numReceivers];
for (int i = 0; i < numReceivers; i++)
{
receivers[i] = new SimpleReceiver();
router.add(receivers[i]);
}
Message msg = CoreMessageFactory.createCoreMessage(123, true, null);
MessageReference ref = ms.reference(msg);
Delivery del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 0);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 1);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 2);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 3);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 4);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 5);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 6);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 7);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 8);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 9);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 0);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 1);
resetReceivers(receivers);
del = router.handle(null, ref, null);
assertNotNull(del);
checkReceiverGotRef(receivers, 2);
resetReceivers(receivers);
}