### Question:
HelperUtils { public static boolean checkEmailAddressValidness(String[] mailAddressParts, String[] domainList) { if (mailAddressParts == null || domainList == null || mailAddressParts.length != 2) { return false; } boolean foundDomain = false; for (String domain : domainList) { if (domain.equalsIgnoreCase(mailAddressParts[1])) { foundDomain = true; break; } } return foundDomain; } private  HelperUtils(); static Long parseTimeString(String input); static String parseStringTs(long ts_Active); static String addZero(int no); static boolean hasCorrectFormat(String input); static void parseEntryValue(Context context, Integer defaultNo); static List<String[]> getLanguageList(String[] availableLanguages, Context context, Result result,
                                                 Messages msg); static boolean checkEmailAddressValidness(String[] mailAddressParts, String[] domainList); static String[] splitMailAddress(String mailAddress); static String getHeaderText(final MimeMessage message); static byte[] readLimitedAmount(InputStream data, int maxSize);  }### Answer:
@Test public void testCheckEmailAddressValidness() { assertFalse(HelperUtils.checkEmailAddressValidness(null, null)); assertFalse(HelperUtils.checkEmailAddressValidness(null, ArrayUtils.EMPTY_STRING_ARRAY)); assertFalse(HelperUtils.checkEmailAddressValidness(ArrayUtils.EMPTY_STRING_ARRAY, ArrayUtils.EMPTY_STRING_ARRAY)); String[] domainList = ArrayUtils.toArray("test.localhost"); String[] mailParts = ArrayUtils.toArray("foo"); assertFalse(HelperUtils.checkEmailAddressValidness(mailParts, domainList)); mailParts = ArrayUtils.add(mailParts, "bar"); assertFalse(HelperUtils.checkEmailAddressValidness(mailParts, domainList)); mailParts[1] = "test.localhost"; assertTrue(HelperUtils.checkEmailAddressValidness(mailParts, domainList)); mailParts[1] = "TesT.LOCALHosT"; assertTrue(HelperUtils.checkEmailAddressValidness(mailParts, domainList)); }