### Question:
GameMasterController { List<Set<String>> splitQuestions(Set<String> inpQuestions) { Random rand = new Random(); List<Set<String>> splitQuestions = new ArrayList<>(); List<String> questions = new ArrayList<>(inpQuestions); for (int i = 0; i < MAX_ROUNDS; i++) { Set<String> roundQuestions = new HashSet<>(); for (int j = 0; j < inpQuestions.size() / MAX_ROUNDS; j++) { int index = rand.nextInt(questions.size()); LOGGER.debug("Random index: " + index); roundQuestions.add( questions.get(index)); LOGGER.debug("Added question: " + questions.get(index) + " to round " + i); questions.remove(index); LOGGER.debug("List after removing question: " + questions.toString()); } splitQuestions.add(roundQuestions); } return splitQuestions; }  @RequestMapping(value = "/game/{gameId}/contender-names", method = RequestMethod.GET) @ResponseBody ContenderNamesResponse getContenderNames(@PathVariable Long gameId); @RequestMapping(value = "/game/{gameId}/start-game", method = RequestMethod.POST) void startGame(@PathVariable Long gameId); @RequestMapping(value = "/game/{gameId}/start-round", method = RequestMethod.POST) void startRound(@PathVariable Long gameId); @RequestMapping(value = "/game/{gameId}/start-voting", method = RequestMethod.POST) void startVoting(@PathVariable Long gameId); @RequestMapping(value = "/game/{gameId}/question-votes", method = RequestMethod.GET) @ResponseBody QuestionVotesResponse getQuestionVotes(@PathVariable Long gameId); @RequestMapping(value = "/game/{gameId}/set-next-to-score", method = RequestMethod.POST) void setNextToScore(@PathVariable Long gameId); @RequestMapping(value = "/game/{gameId}/final-results", method = RequestMethod.GET) @ResponseBody FinalResultsResponse getFinalResults(@PathVariable Long gameId); @RequestMapping(value = "/game/{gameId}/all-votes-submitted", method = RequestMethod.GET) @ResponseBody AllVotesSubmitted allVotesSubmitted(@PathVariable Long gameId); @RequestMapping(value = "/game/{gameId}/more-to-vote-on", method = RequestMethod.GET) @ResponseBody MoreToVoteOn moreQuestionsToVoteOn(@PathVariable Long gameId);  }### Answer:
@Test public void splitQuestions_returnsSameNumberOfQuestions() { Set<String> questions = new HashSet<>(); questions.add("test"); questions.add("test1"); questions.add("test2"); questions.add("test3"); questions.add("test4"); questions.add("test5"); List<Set<String>> newQuestionSet = gameMasterController.splitQuestions(questions); int newCount = 0; for (Set<String> questionSet: newQuestionSet) { newCount += questionSet.size(); } assertEquals(newCount, questions.size()); }