Determines whether password is different than previous two passwords private static boolean differentThanLastTwoPasswordsTest(String password) { return ! (PREVIOUS1) && ! (PREVIOUS2);