SelectEntityController { @RequestMapping(value = "/list", method = RequestMethod.POST) public ServiceResult<ListResult<TaskSqlView>> list(@RequestBody Paging<TaskSql> paging) throws SQLException { return ServiceResult.success(selectEntityService.findSelectEntityPageList(paging)); }  @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<TaskSqlView>> list(@RequestBody Paging<TaskSql> paging); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@Validated(AddSelectEntity.class) @RequestBody TaskSql taskSql, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateSelectEntity.class) @RequestBody TaskSql taskSql, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteSelectEntity.class) @RequestBody TaskSql taskSql, @CurrentUser LoginUser user, Errors errors);  }
@Test public void list() throws Exception { Paging<TaskSql> paging = new Paging<>(); paging.setData(new TaskSql()); String requestJson = JSONObject.toJSONString(paging); mockMvc.perform(MockMvcRequestBuilders.post("/selectEntity/list") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(requestJson) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); }