### Question:
HelloSpringBoot { @GetMapping(value = "param") public Messages param(@RequestParam(value ="username",defaultValue = "Boot") String username){ return new Messages("success","Hello "+ username); }  @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 testParam() { Messages messages = this.restTemplate.getForObject("/hello/param?username=xiaoxian", Messages.class); assertThat(messages.getMessages()).isEqualTo("Hello xiaoxian"); }