@Test public void index() throws Exception { when(articleService.listTopArticles(null)).thenReturn( asList(article(funZone.getZone(), "joke xyz 1"))); mockMvc.perform(get("/")) .andExpect(content().encoding("UTF-8")) .andExpect(content().string(containsString("joke xyz 1"))) .andExpect(content().string(containsString("rec1"))) .andExpect(content().string(containsString("rec2"))) .andExpect(content().string(containsString("/css/kaif.css"))) .andExpect(content().string(containsString("/web/main.dart.js"))); }
@RequestMapping("/") public ModelAndView index( @RequestParam(value = "start", required = false) FlakeId startArticleId) { return new IndexModelAndView(zoneService).addObject("articleList", new ArticleList(articleService.listTopArticles(startArticleId))); }
HomeController { @RequestMapping("/") public ModelAndView index( @RequestParam(value = "start", required = false) FlakeId startArticleId) { return new IndexModelAndView(zoneService).addObject("articleList", new ArticleList(articleService.listTopArticles(startArticleId))); } }
HomeController { @RequestMapping("/") public ModelAndView index( @RequestParam(value = "start", required = false) FlakeId startArticleId) { return new IndexModelAndView(zoneService).addObject("articleList", new ArticleList(articleService.listTopArticles(startArticleId))); }  }
HomeController { @RequestMapping("/") public ModelAndView index( @RequestParam(value = "start", required = false) FlakeId startArticleId) { return new IndexModelAndView(zoneService).addObject("articleList", new ArticleList(articleService.listTopArticles(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("/") public ModelAndView index( @RequestParam(value = "start", required = false) FlakeId startArticleId) { return new IndexModelAndView(zoneService).addObject("articleList", new ArticleList(articleService.listTopArticles(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();  }