@Test public void listLatestArticles() throws Exception { when(articleService.listLatestArticles(null)).thenReturn( asList(article(funZone.getZone(), "double 00"), article(toyZone.getZone(), "gundam"))); mockMvc.perform(get("/new")) .andExpect(model().attributeExists("recommendZones")) .andExpect(content().string(containsString("double 00"))) .andExpect(content().string(containsString("gundam"))); }
@RequestMapping("/new") public ModelAndView listLatestArticles( @RequestParam(value = "start", required = false) FlakeId startArticleId) { return new IndexModelAndView(zoneService).addObject("articleList", new ArticleList(articleService.listLatestArticles(startArticleId))); }
HomeController { @RequestMapping("/new") public ModelAndView listLatestArticles( @RequestParam(value = "start", required = false) FlakeId startArticleId) { return new IndexModelAndView(zoneService).addObject("articleList", new ArticleList(articleService.listLatestArticles(startArticleId))); } }
HomeController { @RequestMapping("/new") public ModelAndView listLatestArticles( @RequestParam(value = "start", required = false) FlakeId startArticleId) { return new IndexModelAndView(zoneService).addObject("articleList", new ArticleList(articleService.listLatestArticles(startArticleId))); }  }
HomeController { @RequestMapping("/new") public ModelAndView listLatestArticles( @RequestParam(value = "start", required = false) FlakeId startArticleId) { return new IndexModelAndView(zoneService).addObject("articleList", new ArticleList(articleService.listLatestArticles(startArticleId))); }  @RequestMapping("/") ModelAndView index(
      @RequestParam(value = "start", required = false) FlakeId startArticleId); @RequestMapping("/hot.rss") Object rssFeed(); @RequestMapping("/new") ModelAndView listLatestArticles(
      @RequestParam(value = "start", required = false) FlakeId startArticleId); @RequestMapping("/new-debate") ModelAndView listLatestDebates(
      @RequestParam(value = "start", required = false) FlakeId startDebateId); @RequestMapping("/zone/a-z") ModelAndView zoneAtoZ(); @RequestMapping("/honor") ModelAndView listTopHonor(); }
HomeController { @RequestMapping("/new") public ModelAndView listLatestArticles( @RequestParam(value = "start", required = false) FlakeId startArticleId) { return new IndexModelAndView(zoneService).addObject("articleList", new ArticleList(articleService.listLatestArticles(startArticleId))); }  @RequestMapping("/") ModelAndView index(
      @RequestParam(value = "start", required = false) FlakeId startArticleId); @RequestMapping("/hot.rss") Object rssFeed(); @RequestMapping("/new") ModelAndView listLatestArticles(
      @RequestParam(value = "start", required = false) FlakeId startArticleId); @RequestMapping("/new-debate") ModelAndView listLatestDebates(
      @RequestParam(value = "start", required = false) FlakeId startDebateId); @RequestMapping("/zone/a-z") ModelAndView zoneAtoZ(); @RequestMapping("/honor") ModelAndView listTopHonor();  }