private void ValidatePassword(string password, string confirmPassword, IPasswordValidator passwordValidator) { if (!passwordValidator.PasswordIsValid(password, confirmPassword)) { throw new ArgumentException("Invalid password"); } }