@Test public void upVotedPart() throws Exception { Account account = accountCitizen("bar111"); String token = prepareAccessToken(account); Article article = article(Zone.valueOf("xyz123"), "my up voted title 1"); when(voteService.listUpVotedArticles(isA(Authorization.class), isNull(FlakeId.class))).thenReturn(asList(article)); mockMvc.perform(get("/account/up-voted.part").header(AccountAccessToken.HEADER_KEY, token)) .andExpect(view().name("account/up-voted.part")) .andExpect(content().string(containsString("my up voted title 1"))); }
@RequestMapping("/up-voted.part") public ModelAndView upVotedPart(AccountAccessToken accountAccessToken, @RequestParam(value = "start", required = false) FlakeId startArticleId) { List<Article> articles = voteService.listUpVotedArticles(accountAccessToken, startArticleId); return new ModelAndView("account/up-voted.part").addObject("articleList", new ArticleList(articles)); }
AccountController { @RequestMapping("/up-voted.part") public ModelAndView upVotedPart(AccountAccessToken accountAccessToken, @RequestParam(value = "start", required = false) FlakeId startArticleId) { List<Article> articles = voteService.listUpVotedArticles(accountAccessToken, startArticleId); return new ModelAndView("account/up-voted.part").addObject("articleList", new ArticleList(articles)); } }
AccountController { @RequestMapping("/up-voted.part") public ModelAndView upVotedPart(AccountAccessToken accountAccessToken, @RequestParam(value = "start", required = false) FlakeId startArticleId) { List<Article> articles = voteService.listUpVotedArticles(accountAccessToken, startArticleId); return new ModelAndView("account/up-voted.part").addObject("articleList", new ArticleList(articles)); }  }
AccountController { @RequestMapping("/up-voted.part") public ModelAndView upVotedPart(AccountAccessToken accountAccessToken, @RequestParam(value = "start", required = false) FlakeId startArticleId) { List<Article> articles = voteService.listUpVotedArticles(accountAccessToken, startArticleId); return new ModelAndView("account/up-voted.part").addObject("articleList", new ArticleList(articles)); }  @RequestMapping("/sign-up") ModelAndView signUp(); @RequestMapping("/sign-in") String signIn(); @RequestMapping("/forget-password") String forgetPassword(); @RequestMapping("/reset-password") ModelAndView resetPassword(@RequestParam("key") String key); @RequestMapping("/settings") String settings(); @RequestMapping("/settings.part") ModelAndView settingsPart(AccountAccessToken accountAccessToken); @RequestMapping("/client-app") String clientApp(); @RequestMapping("/client-app.part") ModelAndView clientAppPart(AccountAccessToken accountAccessToken); @RequestMapping("/news-feed") String newsFeed(); @RequestMapping("/up-voted") String upVoted(); @RequestMapping("/news-feed.part") ModelAndView newsFeedPart(AccountAccessToken accountAccessToken,
      @RequestParam(value = "start", required = false) FlakeId startAssetId); @RequestMapping("/up-voted.part") ModelAndView upVotedPart(AccountAccessToken accountAccessToken,
      @RequestParam(value = "start", required = false) FlakeId startArticleId); @RequestMapping("/activation") ModelAndView activation(@RequestParam("key") String key, HttpServletResponse response); }
AccountController { @RequestMapping("/up-voted.part") public ModelAndView upVotedPart(AccountAccessToken accountAccessToken, @RequestParam(value = "start", required = false) FlakeId startArticleId) { List<Article> articles = voteService.listUpVotedArticles(accountAccessToken, startArticleId); return new ModelAndView("account/up-voted.part").addObject("articleList", new ArticleList(articles)); }  @RequestMapping("/sign-up") ModelAndView signUp(); @RequestMapping("/sign-in") String signIn(); @RequestMapping("/forget-password") String forgetPassword(); @RequestMapping("/reset-password") ModelAndView resetPassword(@RequestParam("key") String key); @RequestMapping("/settings") String settings(); @RequestMapping("/settings.part") ModelAndView settingsPart(AccountAccessToken accountAccessToken); @RequestMapping("/client-app") String clientApp(); @RequestMapping("/client-app.part") ModelAndView clientAppPart(AccountAccessToken accountAccessToken); @RequestMapping("/news-feed") String newsFeed(); @RequestMapping("/up-voted") String upVoted(); @RequestMapping("/news-feed.part") ModelAndView newsFeedPart(AccountAccessToken accountAccessToken,
      @RequestParam(value = "start", required = false) FlakeId startAssetId); @RequestMapping("/up-voted.part") ModelAndView upVotedPart(AccountAccessToken accountAccessToken,
      @RequestParam(value = "start", required = false) FlakeId startArticleId); @RequestMapping("/activation") ModelAndView activation(@RequestParam("key") String key, HttpServletResponse response);  }