public void testDiscussionHistory() throws Exception {
// add some messages
Room room = conference.findOrCreateRoom(ROOM1_JID, "Room 1");
room.getHistory().append(
StanzaBuilder.createMessageStanza(OCCUPANT2_JID, ROOM1_JID, MessageStanzaType.GROUPCHAT, null, "Body")
.build(), new Occupant(OCCUPANT2_JID, "nick2", room, Role.Participant));
room.getHistory().append(
StanzaBuilder.createMessageStanza(OCCUPANT2_JID, ROOM1_JID, MessageStanzaType.GROUPCHAT, null, "Body2")
.build(), new Occupant(OCCUPANT2_JID, "nick2", room, Role.Participant));
room.getHistory().append(
StanzaBuilder.createMessageStanza(OCCUPANT2_JID, ROOM1_JID, MessageStanzaType.GROUPCHAT, null, "Body3")
.build(), new Occupant(OCCUPANT2_JID, "nick2", room, Role.Participant));
// now, let user 1 enter room
enterRoom(OCCUPANT1_JID, ROOM1_JID_WITH_NICK, null, new History(2, null, null, null), false);
Stanza stanza = occupant1Queue.getNext();