MessageUtils { public static Address[] getRecipients(String... addresses) throws AddressException { return getRecipients(Arrays.asList(addresses)); }  static Address[] getRecipients(String... addresses); static Address[] getRecipients(List<String> recipients); static List<BodyPart> extractMessageAttachments(Log logger, Object content); static List<BodyPart> extractInlineImages(Log logger, Object content); static boolean handleParts(Message message, Object content, StringBuffer sbPlain,
            ArrayList<MessageAttachment> attachmentList); static Part handleMultiPart(Log logger, Object content, String attachmentName); static BodyPart fileitemToBodypart(FileItem item); static String decodeText(String s); static String encodeEmail(String s); static String encodeTexts(String s);  }
@Test public void getRecipients () throws Exception { String encodedEmail = "=?ISO-8859-1?Q?Manolo_Pe=F1a?= <hello@hupa.org>"; String decodedEmail = MessageUtils.decodeText(encodedEmail); assertFalse(encodedEmail.equals(decodedEmail)); Address[] addr = MessageUtils.getRecipients(encodedEmail, decodedEmail); assertEquals(addr[0].toString(), addr[1].toString()); }