changeNick(OCCUPANT1_JID, new EntityImpl(ROOM1_JID, "new nick"));
Occupant occupant = room.findOccupantByJID(OCCUPANT1_JID);
assertEquals("new nick", occupant.getNick());
MucUserItem unavailbleItem = new MucUserItem(OCCUPANT1_JID, "new nick", Affiliation.None,
Role.Participant);
assertPresenceStanza(new EntityImpl(ROOM1_JID, "nick"), OCCUPANT1_JID, PresenceStanzaType.UNAVAILABLE, Arrays.asList(unavailbleItem),
Arrays.asList(StatusCode.NEW_NICK, StatusCode.OWN_PRESENCE), occupant1Queue.getNext());
assertPresenceStanza(new EntityImpl(ROOM1_JID, "nick"), OCCUPANT2_JID, PresenceStanzaType.UNAVAILABLE, Arrays.asList(unavailbleItem),
Arrays.asList(StatusCode.NEW_NICK), occupant2Queue.getNext());
MucUserItem availbleItem = new MucUserItem(OCCUPANT1_JID, null, Affiliation.None,
Role.Participant);
assertPresenceStanza(new EntityImpl(ROOM1_JID, "new nick"), OCCUPANT1_JID, null, Arrays.asList(availbleItem),
Arrays.asList(StatusCode.OWN_PRESENCE), occupant1Queue.getNext());
assertPresenceStanza(new EntityImpl(ROOM1_JID, "new nick"), OCCUPANT2_JID, null, Arrays.asList(availbleItem),
null, occupant2Queue.getNext());