@Test public void invalidEmailAddresses() { Assert.assertFalse(EmailAddressUtil.isValid("Abc.example.com")); Assert.assertFalse(EmailAddressUtil.isValid("A@b@c@example.com")); Assert.assertFalse(EmailAddressUtil.isValid("a\"b(c)d,e:f;g<h>i[j\\k]l@example.com")); Assert.assertFalse(EmailAddressUtil.isValid("just\"not\"right@example.com")); Assert.assertFalse(EmailAddressUtil.isValid("this is\"not\\allowed@example.com")); Assert.assertFalse(EmailAddressUtil.isValid("this\\ still\\\"not\\\\allowed@example.com")); }
public static boolean isValid(final EmailAddress emailAddress) { return isValid(emailAddress.getEmail()); }
EmailAddressUtil { public static boolean isValid(final EmailAddress emailAddress) { return isValid(emailAddress.getEmail()); } }
EmailAddressUtil { public static boolean isValid(final EmailAddress emailAddress) { return isValid(emailAddress.getEmail()); }  }
EmailAddressUtil { public static boolean isValid(final EmailAddress emailAddress) { return isValid(emailAddress.getEmail()); }  static String toString(EmailAddress emailAddress); static String toHeaderValue(Collection<EmailAddress> emailAddresses); static boolean equalCollections(final Collection<EmailAddress> a, final Collection<EmailAddress> b); static boolean isValid(final EmailAddress emailAddress); static boolean isValid(final String email); static Collection<EmailAddress> parse(final String userInput); static String shorten(final String input); }
EmailAddressUtil { public static boolean isValid(final EmailAddress emailAddress) { return isValid(emailAddress.getEmail()); }  static String toString(EmailAddress emailAddress); static String toHeaderValue(Collection<EmailAddress> emailAddresses); static boolean equalCollections(final Collection<EmailAddress> a, final Collection<EmailAddress> b); static boolean isValid(final EmailAddress emailAddress); static boolean isValid(final String email); static Collection<EmailAddress> parse(final String userInput); static String shorten(final String input);  }