}
}
public void testPriorityOrder_descendingInsert() throws Exception
{
MessageQueue _queue = new BoundedPriorityEventQueue(20, EventQueueOverflowStrategy.FIFO);
for (int x = 0; x < 10; ++x)
{
int prio = 10 - x;
Message mockMessage = newMessage(prio);
_queue.put(mockMessage);
}
for (int x = 0; x < 10; ++x)
{
Message _event = _queue.getMessage(false);
assertEquals(10 - x, _event.getPriority());
}
}