for (int i = 0; i < 150; i++)
{
prod.send(sess.createMessage());
}
SimpleMessageStore ms = (SimpleMessageStore)ServerManagement.getMessageStore();
assertEquals(100, ms.messageIds().size());
assertEquals(100, getReferenceIds().size());
assertEquals(50, getMessageIds().size());
//Now we close the consumers
cons1.close();
cons2.close();
assertEquals(100, ms.messageIds().size());
assertEquals(50, getReferenceIds().size());
assertEquals(50, getMessageIds().size());
sess.unsubscribe("sub1");
assertEquals(0, ms.messageIds().size());
assertEquals(0, getReferenceIds().size());
assertEquals(0, getMessageIds().size());