Test validatePassword method