EmailValidator implements Serializable { public boolean isValid(String email) { return true; } protected  EmailValidator(boolean allowLocal); static EmailValidator getInstance(); static EmailValidator getInstance(boolean allowLocal); boolean isValid(String email); boolean isValidDomain(String domain); boolean isValidUser(String user);  }
@Test public void testIsValid() { assertTrue(EmailValidator.getInstance(true).isValid("aa")); }