/**
* Tests sending 1, 2 (OOB) and 3, where they are received in the order 1, 3, 2. Message 3 should not get delivered
* until message 4 is received (http://jira.jboss.com/jira/browse/JGRP-780)
*/
public void testRegularAndOOBUnicasts() throws Exception {
DISCARD discard=new DISCARD();
ProtocolStack stack=a.getProtocolStack();
stack.insertProtocol(discard, ProtocolStack.BELOW,(Class<? extends Protocol>[])Util.getUnicastProtocols());
Address dest=b.getAddress();
Message m1=new Message(dest, 1);
Message m2=new Message(dest, 2).setFlag(Message.Flag.OOB);
Message m3=new Message(dest, 3);
MyReceiver receiver=new MyReceiver("B");
b.setReceiver(receiver);
a.send(m1);
discard.setDropDownUnicasts(1);
a.send(m2);
a.send(m3);
Collection<Integer> list=receiver.getMsgs();
int count=10;