@Path("/{username}") @GET @Produces(MediaType.APPLICATION_JSON) public AllQuestionResponseDto getAllQuestions(@PathParam("username") String username) { List<Game> games = gameUserDataManager.getGamesByResultType(username, ResponseType.NEED_RESPONSE); AllQuestionResponseDto results = new AllQuestionResponseDto(); for (Game game : games) { results.addQuestion( dozerMapper.map( questionManager.loadQuestions().getQuestionById(game.getId()), QuestionResponseDto.class)); } return results; }