UserService { public ValidatorChain validatePermision(LoginUser user, Errors errors) { return ValidatorChain.newInstance().controllerValidate(errors) .addAssert(() -> permissionService.isManagerById(user.getId()), message.permisson_user_crud); }  ValidatorChain validatePermision(LoginUser user, Errors errors); boolean canUpdateOrDeleteUser(LoginUser currentUser, LoginUser newUser); boolean canUpdateOrDeleteUser(Long userId, Integer userRole, Long newUserId, Integer newUserRole); boolean addUser(LoginUser user); boolean update(LoginUser user); ListResult<LoginUserView> findUserPageList(Paging<LoginUser> paging); boolean initAdminInfo(LoginUser user); boolean register(LoginUser user); ServiceResult<LoginUser> getUserInfoByWorkName(LoginUser user, String name); ServiceResult getUserManageButton(LoginUser user);  }
@Test public void validatePermisionTest() throws SQLException { Assert.assertTrue(userService.validatePermision(user, errors).validate().isValid()); }