refactored test to use helper method. wrote failing test for password validation