@Test void testGetIndex() throws Exception { mockmvc.perform(get("/").with(jwt().jwt(builder -> builder.subject("Subject A")))) .andExpect(status().isOk()) .andExpect(content().string(containsString("Welcome <a href=\"/whoami\"><span>Subject A</span></a>!"))); }
@GetMapping("/") public String getIndex() { return "index"; }
HotelsApplication { @GetMapping("/") public String getIndex() { return "index"; } }
HotelsApplication { @GetMapping("/") public String getIndex() { return "index"; }  }
HotelsApplication { @GetMapping("/") public String getIndex() { return "index"; }  static void main(String[] args); @GetMapping("/") String getIndex(); @GetMapping("/whoami") @ResponseBody Authentication whoami(Authentication auth); }
HotelsApplication { @GetMapping("/") public String getIndex() { return "index"; }  static void main(String[] args); @GetMapping("/") String getIndex(); @GetMapping("/whoami") @ResponseBody Authentication whoami(Authentication auth);  }