TableEntityService { public ValidatorChain validatePermision(LoginUser user, TaskTable taskTable, Errors errors) { return ValidatorChain.newInstance().controllerValidate(errors) .addAssert(() -> this.validatePermision(taskTable.getProject_id(), user.getId()), message.permisson_user_crud); }  ValidatorChain validatePermision(LoginUser user, TaskTable taskTable, Errors errors); ListResult<TaskTableView> findTableEntityPageList(Paging<TaskTable> paging); Long insertTask(TaskTable task); ServiceResult<String> addTaskTableList(LoginUser user, List<TaskTable> list);  }
@Test public void validatePermisionTest() throws SQLException { Assert.assertTrue(tableEntityService.validatePermision(user, taskTable, errors).validate().isValid()); }