CollaborativeRoom { public static Set<CollaborativeRoom> getAllCollaborativeRooms() { return new HashSet<>(DB.values()); } CollaborativeRoom(Session master); static CollaborativeRoom getByKeyName(String roomKey); static Set<CollaborativeRoom> getAllCollaborativeRooms(); String getLastMaster(); void setLastMaster(String lastMaster); @Override String toString(); JsonObject getContext(); void put(); void delete(); Session getMaster(); String getMasterName(); void setMaster(Session master); String getKey(); void setKey(String key); List<Session> getSlaves(); void addSlave(Session slave); boolean removeSlave(Session slave); List<String> getPendingUsers(); void addPendingUser(String user); boolean removePendingUser(String user); Date getCreationDate(); Session findUserSession(String user); JsonObject getCommands(); void saveCommand(JsonObject command);  }
@Test public void shouldReturnFourRooms() { CollaborativeRoom collaborativeRoom1 = Mockito.spy(new CollaborativeRoom(master)); CollaborativeRoom collaborativeRoom2 = Mockito.spy(new CollaborativeRoom(master)); CollaborativeRoom collaborativeRoom3 = Mockito.spy(new CollaborativeRoom(master)); CollaborativeRoom collaborativeRoom4 = Mockito.spy(new CollaborativeRoom(master)); Assert.assertEquals(4, CollaborativeRoom.getAllCollaborativeRooms().size()); }