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