### Question:
AuthController { @GetMapping(value = "/qrcode") public byte[] qrcode(@RequestParam("uuid") String uuid) { return userService.getQrcode(uuid); } @Autowired  AuthController(DefaultTokenServices defaultTokenServices); @GetMapping(value = "/uuid") String uuid(); @GetMapping(value = "/qrcode") byte[] qrcode(@RequestParam("uuid") String uuid); @PutMapping(value = "/settoken") void setToken(@RequestParam("uuid") String uuid, @RequestParam("token") String token); @PostMapping(value = "/verify", produces = "application/json") int verify(@RequestBody User user); @GetMapping(value = "/signup", produces = "application/json") RedirectView create(@RequestParam int hashCode); @PreAuthorize("hasRole('USER')") @Transactional @DeleteMapping(value = "/exit", produces = "application/json") ResponseEntity<?> revokeToken(@RequestParam("access_token") String accessToken); @PreAuthorize("hasRole('ADMIN')") @PostMapping(value = "/grant/role/{role}", produces = "application/json") ResponseEntity<?> grantRole(@PathVariable("role") String roleName,
                                       @RequestParam("username") String username,
                                       @RequestParam("operation") String c); @PreAuthorize("hasRole('ADMIN')") @PostMapping(value = "/revoke/authority/{authority}", produces = "application/json") ResponseEntity<?> revokeAuthority(@PathVariable("authority") String authorityName,
                                       @RequestParam("username") String username,
                                       @RequestParam("operation") String c);  }### Answer:
@Test public void testQrcode() throws Exception { MvcResult mvcResult = mvc.perform(get("/uuid")) .andReturn(); String uuid = mvcResult.getResponse().getContentAsString(); mvc.perform(get("/qrcode?uuid="+uuid)); mvc.perform(put("/settoken?uuid="+uuid+"&token=tokentest")); }