@Test public void settingsPart() throws Exception { Account account = accountTourist("foo").withDescription("**foo**"); String token = prepareAccessToken(account); when(accountService.findMe(isA(Authorization.class))).thenReturn(Optional.of(account)); mockMvc.perform(get("/account/settings.part").header(AccountAccessToken.HEADER_KEY, token)) .andExpect(content().string(containsString("<p><strong>foo</strong></p>"))) .andExpect(view().name("account/settings.part")) .andExpect(content().string(containsString("foo@example.com"))) .andExpect(content().string(containsString("foo"))); }
@RequestMapping("/settings.part") public ModelAndView settingsPart(AccountAccessToken accountAccessToken) { Account account = accountService.findMe(accountAccessToken).orElse(null); return new ModelAndView("account/settings.part").addObject("account", account); }
AccountController { @RequestMapping("/settings.part") public ModelAndView settingsPart(AccountAccessToken accountAccessToken) { Account account = accountService.findMe(accountAccessToken).orElse(null); return new ModelAndView("account/settings.part").addObject("account", account); } }
AccountController { @RequestMapping("/settings.part") public ModelAndView settingsPart(AccountAccessToken accountAccessToken) { Account account = accountService.findMe(accountAccessToken).orElse(null); return new ModelAndView("account/settings.part").addObject("account", account); }  }
AccountController { @RequestMapping("/settings.part") public ModelAndView settingsPart(AccountAccessToken accountAccessToken) { Account account = accountService.findMe(accountAccessToken).orElse(null); return new ModelAndView("account/settings.part").addObject("account", account); }  @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("/settings.part") public ModelAndView settingsPart(AccountAccessToken accountAccessToken) { Account account = accountService.findMe(accountAccessToken).orElse(null); return new ModelAndView("account/settings.part").addObject("account", account); }  @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);  }