CommonsmailHelperImpl implements CommonsmailHelper { @Override public List<Tuple<String, String>> createListOfAddresses(Collection<String> emails) throws AddressException { List<Tuple<String, String>> tuples = new ArrayList<Tuple<String, String>>(); for (String email : emails) { tuples.add(createValidEmailFromString(email)); } return tuples; }  @Override MultiPartEmail createMultiPartEmailWithContent(Mail mail); @Override void doPopulateMultipartMailWithContent(MultiPartEmail multiPartEmail, Mail mail); @Override void doSetServerParameter(MultiPartEmail multiPartEmail, String smtpHost,
            Integer smtpPort, Boolean smtpSsl, Boolean smtpStartTLS, Boolean smtpStartTLSRequired,
            String smtpUser, String smtpPassword,
            Boolean smtpDebug); @Override List<Tuple<String, String>> createListOfAddresses(Collection<String> emails); @Override Tuple<String, String> createValidEmailFromString(String email);  }
@Test public void testCreateListOfAddresses() throws Exception { List<String> list = new ArrayList<String>(); list.add("The user <the.user@me.com>"); list.add("another.user@me.com"); List<Tuple<String, String>> tupleList = commonsmailHelper.createListOfAddresses(list); assertEquals(2, tupleList.size()); assertEquals("the.user@me.com", tupleList.get(0).x); assertEquals("The user", tupleList.get(0).y); assertEquals("another.user@me.com", tupleList.get(1).x); assertEquals(null, tupleList.get(1).y); }