### Question:
HelloSpringBoot { @PostMapping("text") public String text(@RequestBody String text){ return text; }  @RequestMapping("string") @ResponseStatus(HttpStatus.OK) String helloString(); @RequestMapping(value = "json") Messages helloJson(); @GetMapping(value = "param") Messages param(@RequestParam(value ="username",defaultValue = "Boot") String username); @PostMapping(value = "path/{username}") Messages pathVariable(@PathVariable("username") String username); @PostMapping("body") Messages body(@RequestBody SysUser sysUser); @PostMapping("text") String text(@RequestBody String  text); @PostMapping("form") Messages form(SysUser sysUser);  }### Answer:
@Test void testText() { String string = "Hi,Spring Boot"; String result = this.restTemplate.postForObject("/hello/text", string, String.class); assertThat(result).isEqualTo(string); }