InternetAddressUtil { public static boolean contains( InternetAddress[] internetAddresses, String emailAddress) { if ((internetAddresses != null) && Validator.isNotNull(emailAddress)) { for (InternetAddress internetAddress : internetAddresses) { if (emailAddress.equals(internetAddress.getAddress())) { return true; } } } return false; }  static boolean contains(
		InternetAddress[] internetAddresses, String emailAddress); static boolean isValid(String emailAddress); static InternetAddress[] removeEntry(
		Address[] addresses, String emailAddress); static String toString(Address address); static String toString(Address[] addresses); static void validateAddress(Address address); static void validateAddresses(Address[] addresses);  }
@Test public void testContainsNullEmailAddress() { Assert.assertFalse( InternetAddressUtil.contains(_internetAddresses, null)); }
@Test public void testContainsValidEmailAddress() { Assert.assertTrue( InternetAddressUtil.contains(_internetAddresses, "1@liferay.com")); }
@Test public void testNotContainsValidEmailAddress() { Assert.assertFalse( InternetAddressUtil.contains(_internetAddresses, "12@liferay.com")); }