### Question:
UserController { @PutMapping("/user/userInfo/update") public Response updateInfo(String desc, String displayName) { return ResponseUtil.success(userService.update(desc, displayName)); }  @PostMapping("/login") Response login(@RequestBody LoginReq loginReq); @PostMapping("/registration") Response registration(@RequestParam("email") String email,
                                 @RequestParam("password") String password); @GetMapping("/logout") Response logout(); @PutMapping("/user/userInfo/update") Response updateInfo(String desc, String displayName); @GetMapping("/user/userInfo") Response getUserInfo(); @PostMapping("/user/imgUpload") @ResponseBody Response upload(@RequestParam("file") MultipartFile file); @PostMapping("/sendResetPwdEmail") Response sendResetPwdEmail(@RequestParam("email") String email); @PostMapping("/sendVerifyEmail") Response sendVerifyEmail(@RequestParam("email") String email); @PostMapping("/emailVerify") Response emailVerify(@RequestParam("verifyId") String verifyId,
                                @RequestParam("email") String mail); @PostMapping("/resetPwd") Response resetPwd(@RequestParam("verifyId") String verifyId,
                             @RequestParam("email") String email,
                             @RequestParam("pwd") String pwd); @DeleteMapping("/admin/user/delete") Response multipleDelete(@RequestBody Integer[] ids); @DeleteMapping("/admin/user/delete/{id}") Response delete(@PathVariable("id") Integer id); @PutMapping("/admin/user") Response updateInfoByAdmin(@RequestBody UserReq user); @GetMapping("/admin/users") Response getAllUser(@RequestParam("page") int pageNum, @RequestParam("count") int count); @GetMapping("/emailStatus/{email}") Response getEmailStatus(@PathVariable("email") String email);  }### Answer:
@Test public void updateInfo() throws Exception { String desc = UUID.randomUUID().toString().substring(0, 4); String disPlayName = UUID.randomUUID().toString().substring(0, 4); mockMvc.perform(put("/user/userInfo/update?desc=" + desc + "&displayName=" + disPlayName).header("Authorization", userLogin())) .andDo(result -> { JSONObject object = JSONObject.fromObject(result.getResponse().getContentAsString()); assertEquals(SUCCESS.getCode(), object.getInt(Code)); UserModel u = (UserModel) JSONObject.toBean(object.getJSONObject(Result), UserModel.class); assertEquals(desc, u.getDesc()); assertEquals(disPlayName, u.getDisplayName()); assertNotNull(u.getId()); }); }