### Question:
MailUtil { private static MimeMessage readMime(InputStream is) throws MessagingException { Properties props = System.getProperties(); props.put("mail.transport.protocol", "smtp"); props.put("mail.smtp.provider.class", CustomTransport.class.getName()); props.put("mail.smtp.provider.vendor", "foo"); props.put("mail.smtp.provider.version", "0.0.0"); props.put("mail.transport.protocol", "smtp"); try { Session mailSession = Session.getInstance(props, null); MimeMessage msg = new MimeMessage(mailSession, is); return msg; } catch (Throwable t) { t.printStackTrace(); } return null; }  static boolean emlContainsAttachments(InputStream is); static EMail msgToMail(InputStream is, boolean extractAttachmentContent); static EMail msgToMail(File msgFile, boolean extractAttachmentContent); static EMail messageToMail(InputStream is, boolean extractAttachmentContent); static EMail messageToMail(File emlFile, boolean extractAttachmentContent); static EMail messageToMail(javax.mail.Message msg, boolean extractAttachmentContent); static String getAddressName(Address a); static String getAddressEmail(Address a); static boolean msgContainsAttachments(File msgFile); static boolean msgContainsAttachments(InputStream is); static boolean emlContainsAttachments(File emlFile); static final String NO_SUBJECT; static final String NO_BODY; }### Answer:
@Test public void testReadMime() throws Exception { EMail mail = MailUtil.messageToMail(new File("src/test/resources/fattura.eml"), false); Assert.assertNotNull(mail); }