### Question:
UserLoginWeb { @ApiOperation(value = "用户登陆", httpMethod = "POST",code = 200,produces = MediaType.APPLICATION_JSON_VALUE) @RequestMapping(value = "/login",method = RequestMethod.POST, produces = { "application/json"}) @Limit(key = "USER:LOGIN", period = 10, count = 1000) public MsgResponseBody<JWTUserDetail> login(@RequestJsonParam("userName") String userName, @RequestJsonParam("passWord") String passWord) { UserVo userVo = new UserVo(); userVo.setAccountname(userName); userVo.setPassword(passWord); return userService.login(userVo); }  @ApiOperation(value = "用户登陆", httpMethod = "POST",code = 200,produces = MediaType.APPLICATION_JSON_VALUE) @RequestMapping(value = "/login",method = RequestMethod.POST, produces = { "application/json"}) //限流 10秒内最多允许1000次访问 @Limit(key = "USER:LOGIN", period = 10, count = 1000) MsgResponseBody<JWTUserDetail> login(@RequestJsonParam("userName") String userName, @RequestJsonParam("passWord") String passWord); @ApiOperation(value = "用户注册", httpMethod = "POST",code = 200,produces = MediaType.APPLICATION_JSON_VALUE) @RequestMapping(value = "/register",method = RequestMethod.POST, produces = { "application/json"}) //默认5秒内同一手机号不可重复提交 @PreventResubmitLock(prefix = "USER:REGISTER") //cache会在方法执行后缓存,相当于更新了缓存,少了一步查询缓存 MsgResponseBody<String> register(@RequestBody @PreventParam(name = "userPhone") UserVo userVo);  }### Answer:
@Test public void login() throws Exception { mvc.perform(MockMvcRequestBuilders.post("/sc/user/auth/login").content("{\"userName\":\"senssic\",\"passWord\":\"123456\"}").contentType(MediaType.APPLICATION_JSON_UTF8). accept(MediaType.APPLICATION_JSON_UTF8)).andExpect(MockMvcResultMatchers.status().isOk()). andDo(MockMvcResultHandlers.print()). andReturn(); }