@Test public void userHonors() throws Exception { HonorRoll h1 = honorRoll(zone); HonorRoll h2 = honorRoll(Zone.valueOf("java")); when(honorRollService.listHonorAllByUsername("foo-user")).thenReturn(asList(h1, h2)); mockMvc.perform(get("/u/foo-user/honors")) .andExpect(content().string(containsString("/z/java"))); }
@RequestMapping("/u/{username}/honors") public ModelAndView userHonors(@PathVariable("username") String username) { List<HonorRoll> honorRolls = honorRollService.listHonorAllByUsername(username); return new ModelAndView("account/user-honors").addObject("honorRolls", honorRolls); }
UserController { @RequestMapping("/u/{username}/honors") public ModelAndView userHonors(@PathVariable("username") String username) { List<HonorRoll> honorRolls = honorRollService.listHonorAllByUsername(username); return new ModelAndView("account/user-honors").addObject("honorRolls", honorRolls); } }
UserController { @RequestMapping("/u/{username}/honors") public ModelAndView userHonors(@PathVariable("username") String username) { List<HonorRoll> honorRolls = honorRollService.listHonorAllByUsername(username); return new ModelAndView("account/user-honors").addObject("honorRolls", honorRolls); }  }
UserController { @RequestMapping("/u/{username}/honors") public ModelAndView userHonors(@PathVariable("username") String username) { List<HonorRoll> honorRolls = honorRollService.listHonorAllByUsername(username); return new ModelAndView("account/user-honors").addObject("honorRolls", honorRolls); }  @RequestMapping("/u/{username}") Object userProfile(@PathVariable("username") String username); @RequestMapping("/u/{username}/articles") ModelAndView createdArticles(@PathVariable("username") String username,
      @RequestParam(value = "start", required = false) FlakeId startArticleId); @RequestMapping("/u/{username}/honors") ModelAndView userHonors(@PathVariable("username") String username); @RequestMapping("/u/{username}/debates") ModelAndView createdDebates(@PathVariable("username") String username,
      @RequestParam(value = "start", required = false) FlakeId startDebateId); }
UserController { @RequestMapping("/u/{username}/honors") public ModelAndView userHonors(@PathVariable("username") String username) { List<HonorRoll> honorRolls = honorRollService.listHonorAllByUsername(username); return new ModelAndView("account/user-honors").addObject("honorRolls", honorRolls); }  @RequestMapping("/u/{username}") Object userProfile(@PathVariable("username") String username); @RequestMapping("/u/{username}/articles") ModelAndView createdArticles(@PathVariable("username") String username,
      @RequestParam(value = "start", required = false) FlakeId startArticleId); @RequestMapping("/u/{username}/honors") ModelAndView userHonors(@PathVariable("username") String username); @RequestMapping("/u/{username}/debates") ModelAndView createdDebates(@PathVariable("username") String username,
      @RequestParam(value = "start", required = false) FlakeId startDebateId);  }