added unit tests for password generation