public void setUp() throws AMQException
{
_unacknowledgedMessageMap = new UnacknowledgedMessageMapImpl(100);
long id = 0;
SimpleQueueEntryList list = new SimpleQueueEntryList(_queue);
// Add initial messages to QueueEntryList
for (int count = 0; count < INITIAL_MSG_COUNT; count++)
{
AMQMessage msg = new MockAMQMessage(id);
list.add(msg);
//Increment ID;
id++;
}
// Iterate through the QueueEntryList and add entries to unacknowledgeMessageMap and referecenList
QueueEntryIterator queueEntries = list.iterator();
while(queueEntries.advance())
{
QueueEntry entry = queueEntries.getNode();
_unacknowledgedMessageMap.add(entry.getMessage().getMessageNumber(), entry);