Assert.assertEquals(6, tab.getNextToReceive(MBR));
}
public static void testAddWithGaps2() {
SeqnoTable tab=new SeqnoTable(0);
boolean rc=tab.add(MBR, 5);
System.out.println("tab: " + tab);
assert rc;
Assert.assertEquals(5, tab.getHighestReceived(MBR));
Assert.assertEquals(0, tab.getNextToReceive(MBR));
rc=tab.add(MBR, 4);
System.out.println("tab: " + tab);
assert rc;
Assert.assertEquals(5, tab.getHighestReceived(MBR));
Assert.assertEquals(0, tab.getNextToReceive(MBR));
rc=tab.add(MBR, 3);
System.out.println("tab: " + tab);
assert rc;
Assert.assertEquals(5, tab.getHighestReceived(MBR));
Assert.assertEquals(0, tab.getNextToReceive(MBR));
rc=tab.add(MBR, 2);
System.out.println("tab: " + tab);
assert rc;
Assert.assertEquals(5, tab.getHighestReceived(MBR));
Assert.assertEquals(0, tab.getNextToReceive(MBR));
rc=tab.add(MBR, 1);
System.out.println("tab: " + tab);
assert rc;
Assert.assertEquals(5, tab.getHighestReceived(MBR));
Assert.assertEquals(0, tab.getNextToReceive(MBR));
rc=tab.add(MBR, 0);
System.out.println("tab: " + tab);
assert rc;
Assert.assertEquals(5, tab.getHighestReceived(MBR));
Assert.assertEquals(6, tab.getNextToReceive(MBR));
}