@Test @WithMockUser public void hello() throws Exception { mockMvc.perform(get("/hello")) .andDo(print()) .andExpect(status().isOk()) .andExpect(view().name("hello")); }
@GetMapping("/hello") public String hello() { return "hello"; }
MainController { @GetMapping("/hello") public String hello() { return "hello"; } }
MainController { @GetMapping("/hello") public String hello() { return "hello"; }  }
MainController { @GetMapping("/hello") public String hello() { return "hello"; }  @GetMapping("/hello") String hello(); @GetMapping("/my") String my(); @GetMapping("/index") String index(); }
MainController { @GetMapping("/hello") public String hello() { return "hello"; }  @GetMapping("/hello") String hello(); @GetMapping("/my") String my(); @GetMapping("/index") String index();  }