MyRestController { @GetMapping("/hello") public ResponseEntity<String> hello() { String data = "myData"; return new ResponseEntity<>(data, HttpStatus.OK); }  @GetMapping("/hello") ResponseEntity<String> hello();  }
@Test public void hello() { mockServer.expect(MockRestRequestMatchers.requestTo("/rest/hello")) .andRespond(MockRestResponseCreators.withSuccess( new ClassPathResource("/test.json", getClass()), MediaType.APPLICATION_JSON)); }