assertEquals("the subject", handler.getLastEvent().getSubject());
}
@Test
public void shouldRemoveOccupant() {
final OccupantChangedTestHandler handler = new OccupantChangedTestHandler("removed");
room.addOccupantChangedHandler(handler);
final XmppURI occupantUri = uri("room@domain/name");
room.setOccupantPresence(userURI, occupantUri, "owner", "participant", Show.notSpecified, null);
assertEquals(1, room.getOccupantsCount());
room.removeOccupant(occupantUri);
assertEquals(0, room.getOccupantsCount());
assertEquals(1, handler.getCalledTimes());
assertNull(room.getOccupantByOccupantUri(occupantUri));
}