AdminController { @RequestMapping(params = "resume", method = RequestMethod.GET) public String resumeGame(Model model) { timerService.resume(); return getAdminPage(model); } AdminController();   AdminController(TimerService timerService, GameSettingsService gameSettingsService, PlayerService playerService); @RequestMapping(params = "save", method = RequestMethod.GET) String savePlayerGame(@RequestParam("save") String name, Model model); @RequestMapping(params = "load", method = RequestMethod.GET) String loadPlayerGame(@RequestParam("load") String name, Model model); @RequestMapping(params = "remove", method = RequestMethod.GET) String removePlayer(@RequestParam("remove") String name, Model model); @RequestMapping(params = "pause", method = RequestMethod.GET) String pauseGame(Model model); @RequestMapping(params = "resume", method = RequestMethod.GET) String resumeGame(Model model); @RequestMapping(method = RequestMethod.POST) String saveSettings(AdminSettings settings, BindingResult result, Model model); @RequestMapping(method = RequestMethod.GET) String getAdminPage(Model model);  }
@Test public void shouldResumeGameWhenResumeGameAction() { when(timerService.isPaused()).thenReturn(GAME_ACTIVE); String jsp = controller.resumeGame(model); assertEquals("admin", jsp); verify(model).addAttribute("paused", GAME_ACTIVE); verify(timerService).resume(); }