private long nextId;
private void sendAndCheck(ClusterRouter router, SimpleReceiver receiver) throws Exception
{
Message msg = CoreMessageFactory.createCoreMessage(nextId++, false, null);
MessageReference ref = ms.reference(msg);
Delivery del = router.handle(null, ref, null);
assertNotNull(del);
assertTrue(del.isSelectorAccepted());
Thread.sleep(250);
List msgs = receiver.getMessages();
assertNotNull(msgs);
assertEquals(1, msgs.size());
Message msgRec = (Message)msgs.get(0);
assertTrue(msg == msgRec);
receiver.clear();
}