### Question:
TrainController { @GetMapping(path = "/trains/welcome") public String home(@RequestHeader HttpHeaders headers) { return "Welcome to [ Train Service ] !"; }  @GetMapping(path = "/trains/welcome") String home(@RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PostMapping(value = "/trains") HttpEntity create(@RequestBody TrainType trainType, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(value = "/trains/{id}") HttpEntity retrieve(@PathVariable String id, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @PutMapping(value = "/trains") HttpEntity update(@RequestBody TrainType trainType, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @DeleteMapping(value = "/trains/{id}") HttpEntity delete(@PathVariable String id, @RequestHeader HttpHeaders headers); @CrossOrigin(origins = "*") @GetMapping(value = "/trains") HttpEntity query(@RequestHeader HttpHeaders headers);  }### Answer:
@Test public void testHome() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/api/v1/trainservice/trains/welcome")) .andExpect(MockMvcResultMatchers.status().isOk()) .andExpect(MockMvcResultMatchers.content().string("Welcome to [ Train Service ] !")); }