super.tearDown();
}
public void testSize() throws Exception
{
RoundRobinRouter dr = new RoundRobinRouter();
ClusteredQueue queue1 = new SimpleQueue(true);
dr.add(queue1);
assertEquals(1, dr.getNumberOfReceivers());
assertEquals(1, dr.getQueues().size());
ClusteredQueue queue2 = new SimpleQueue(false);
dr.add(queue2);
assertEquals(2, dr.getNumberOfReceivers());
assertEquals(2, dr.getQueues().size());
ClusteredQueue queue3 = new SimpleQueue(false);
dr.add(queue3);
assertEquals(3, dr.getNumberOfReceivers());
assertEquals(3, dr.getQueues().size());
dr.remove(queue3);
assertEquals(2, dr.getNumberOfReceivers());
assertEquals(2, dr.getQueues().size());
dr.remove(queue2);
assertEquals(1, dr.getNumberOfReceivers());
assertEquals(1, dr.getQueues().size());
dr.remove(queue1);
assertEquals(0, dr.getNumberOfReceivers());
assertTrue(dr.getQueues().isEmpty());
}