StrongPasswordValidator implements IValidator<String> { private static boolean noDigit(String password) { return password == null || (isPwdCheckDigit() && !password.matches(".*\\d+.*")); } StrongPasswordValidator(final User u);  StrongPasswordValidator(final boolean web, final User u); @Override void validate(IValidatable<String> pass); void setUser(User u);  }
@Test void testNoDigit() { try { setPwdCheckDigit(false); test("password", false, getUser3(), 2); } finally { setPwdCheckDigit(true); } }