PacketCollector collector = getConnection(1).createPacketCollector(
new MessageTypeFilter(Message.Type.chat));
getConnection(1).sendPacket(new Presence(Presence.Type.available));
// Check that no offline messages was sent to the user
Message message = (Message) collector.nextResult(2500);
assertNull("An offline message was sent from the server", message);
// Delete the retrieved offline messages
offlineManager.deleteMessages(stamps);
// Check that there are no offline message for this user