@Test
public void shouldAcceptInvitations() {
final RoomChatChangedTestHandler handler = new RoomChatChangedTestHandler();
final ChatProperties properties = new ChatProperties(USER);
manager.addRoomChatChangedHandler(handler);
final RoomInvitation invitation = new RoomInvitation(uri("friend@host/resource"), uri("room@room.service"), "theReason", properties);
manager.acceptRoomInvitation(invitation);
assertEquals(2, handler.getCalledTimes());
assertEquals(ChangeType.created, handler.getEvent(0).getChangeType());
assertEquals(ChangeType.opened, handler.getEvent(1).getChangeType());
}