@Test public void index() throws Exception { mvc.perform(MockMvcRequestBuilders.get("/").accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().string(equalTo("It is working!"))); }
@RequestMapping("/") public String index() { return "It is working!"; }
HelloController { @RequestMapping("/") public String index() { return "It is working!"; } }
HelloController { @RequestMapping("/") public String index() { return "It is working!"; }  }
HelloController { @RequestMapping("/") public String index() { return "It is working!"; }  @RequestMapping("/") String index(); }
HelloController { @RequestMapping("/") public String index() { return "It is working!"; }  @RequestMapping("/") String index();  }