StrongPasswordValidator implements IValidator<String> { public void setUser(User u) { this.u = u; } StrongPasswordValidator(final User u);  StrongPasswordValidator(final boolean web, final User u); @Override void validate(IValidatable<String> pass); void setUser(User u);  }
@Test void testSetUser() { runWrapped(() -> { Validatable<String> pass = new Validatable<>(null); StrongPasswordValidator validator = new StrongPasswordValidator(null); validator.setUser(new User()); validator.validate(pass); assertEquals(5, pass.getErrors().size()); }); }