RoomManager { public Set<String> getRooms() { return new HashSet<String>(rooms.keySet()); } RoomManager(RoomHandler roomHandler, KurentoClientProvider kcProvider); Set<UserParticipant> joinRoom(String userName, String roomName, boolean dataChannels,
      boolean webParticipant, KurentoClientSessionInfo kcSessionInfo, String participantId); Set<UserParticipant> leaveRoom(String participantId); String publishMedia(String participantId, boolean isOffer, String sdp,
      MediaElement loopbackAlternativeSrc, MediaType loopbackConnectionType, boolean doLoopback,
      MediaElement... mediaElements); String publishMedia(String participantId, String sdp, boolean doLoopback,
      MediaElement... mediaElements); String publishMedia(String participantId, boolean isOffer, String sdp, boolean doLoopback,
      MediaElement... mediaElements); String generatePublishOffer(String participantId); void unpublishMedia(String participantId); String subscribe(String remoteName, String sdpOffer, String participantId); void unsubscribe(String remoteName, String participantId); void onIceCandidate(String endpointName, String candidate, int sdpMLineIndex,
      String sdpMid, String participantId); void addMediaElement(String participantId, MediaElement element); void addMediaElement(String participantId, MediaElement element, MediaType type); void removeMediaElement(String participantId, MediaElement element); void mutePublishedMedia(MutedMediaType muteType, String participantId); void unmutePublishedMedia(String participantId); void muteSubscribedMedia(String remoteName, MutedMediaType muteType, String participantId); void unmuteSubscribedMedia(String remoteName, String participantId); @PreDestroy void close(); boolean isClosed(); Set<String> getRooms(); Set<UserParticipant> getParticipants(String roomName); Set<UserParticipant> getPublishers(String roomName); Set<UserParticipant> getSubscribers(String roomName); Set<UserParticipant> getPeerPublishers(String participantId); Set<UserParticipant> getPeerSubscribers(String participantId); boolean isPublisherStreaming(String participantId); void createRoom(KurentoClientSessionInfo kcSessionInfo); Set<UserParticipant> closeRoom(String roomName); MediaPipeline getPipeline(String participantId); String getRoomName(String participantId); String getParticipantName(String participantId); UserParticipant getParticipantInfo(String participantId); void updateFilter(String roomId, String filterId);  }
@Test public void joinRoomFail() { assertThat(manager.getRooms(), not(hasItem(roomx))); exception.expect(RoomException.class); exception.expectMessage(containsString("must be created before")); userJoinRoom(roomx, userx, pidx, false); assertThat(manager.getRooms(), not(hasItem(roomx))); }