/**
* 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=c1.getProtocolStack();
stack.insertProtocol(discard, ProtocolStack.BELOW, UNICAST.class, UNICAST2.class);
Address dest=c2.getAddress();
Message m1=new Message(dest, null, 1);
Message m2=new Message(dest, null, 2);
m2.setFlag(Message.OOB);
Message m3=new Message(dest, null, 3);
MyReceiver receiver=new MyReceiver("C2");
c2.setReceiver(receiver);
c1.send(m1);
discard.setDropDownUnicasts(1);
c1.send(m2);
c1.send(m3);
sendStableMessages(c1,c2);
Util.sleep(1000); // time for potential retransmission