@Test public void shouldRejectPasswordThatDoesNotHaveEnoughCharacterClasses() { for (int i = 0; i < 1000; i++) { final char[] pw = generatedPassword( TokenPinPolicy.MIN_PASSWORD_LENGTH, UPPERCASE_LETTERS, DIGITS); assertFalse(TokenPinPolicy.validate(pw)); } }
public static boolean validate(final char[] pin) { return describe(pin).isValid(); }
TokenPinPolicy { public static boolean validate(final char[] pin) { return describe(pin).isValid(); } }
TokenPinPolicy { public static boolean validate(final char[] pin) { return describe(pin).isValid(); } private  TokenPinPolicy(); }
TokenPinPolicy { public static boolean validate(final char[] pin) { return describe(pin).isValid(); } private  TokenPinPolicy(); static boolean validate(final char[] pin); static Description describe(final char[] pin); }
TokenPinPolicy { public static boolean validate(final char[] pin) { return describe(pin).isValid(); } private  TokenPinPolicy(); static boolean validate(final char[] pin); static Description describe(final char[] pin); static final int MIN_PASSWORD_LENGTH; static final int MIN_CHARACTER_CLASS_COUNT; }