Update PasswordTest.java

Adapt the test to char[] passwords and improve test coverage