### Question:
PlayerGamesView { public List<PScoresOf> getScoresForRoom(String roomName) { return scoresFor(pg -> pg.getRoomName().equals(roomName)); }  Map<String, GameData> getGamesDataMap(); Map<String, List<String>> getGroupsMap(); List<List<String>> getGroupsByRooms(); List<List<String>> getGroupsByField(); Map<String, Object> getScores(); List<PScoresOf> getScoresForGame(String gameName); List<PScoresOf> getScoresForRoom(String roomName); Map<String, String> getReadableNames();  }### Answer:
@Test public void testGetScoresForRoom() { GameField field1 = mock(GameField.class); GameField field2 = mock(GameField.class); List<GameField> fields = new LinkedList<GameField>(){{ addAll(Arrays.asList(field1, field1, field1, field1)); addAll(Arrays.asList(field2, field2)); }}; GameType gameType = addNewGameType("gameName1", 1234, inv -> fields.remove(0)); addNewPlayer(gameType, "room1", 123, getHeroData(10, pt(1, 2), "data1")); addNewPlayer(gameType, "room1", 234, getHeroData(11, pt(3, 4), "data2")); addNewPlayer(gameType, "room1", 345, getHeroData(12, pt(5, 6), new JSONObject("{'key':'value'}"))); addNewPlayer(gameType, "room1", 456, getHeroData(13, pt(7, 8), Arrays.asList("data3, data4"))); addNewPlayer(gameType, "room2", 678, getHeroData(23, pt(5, 6), "data8")); addNewPlayer(gameType, "room2", 789, getHeroData(24, pt(8, 7), "data9")); List<PScoresOf> scores = playerGamesView.getScoresForRoom("room1"); assertEquals("[{'score':123,'name':'readable_user1','id':'user1'}," + "{'score':234,'name':'readable_user2','id':'user2'}," + "{'score':345,'name':'readable_user3','id':'user3'}," + "{'score':456,'name':'readable_user4','id':'user4'}]", JsonUtils.clean(JsonUtils.toStringSorted(new JSONArray(scores)))); }