Properties attachments = new Properties();
attachments.setProperty("ALLEGATO", "target/test/entando_logo.jpg");
this._mailManager.sendMail(MAIL_TEXT, "Mail with attachment & text html",
IMailManager.CONTENTTYPE_TEXT_HTML, attachments, JpmailTestHelper.MAIL_ADDRESSES, null, null, SENDER_CODE);
MockMessageHandler messageHandler = this._myFactory.getMessageHandler();
List<MockMailMessage> messages = messageHandler.getMessages();
assertNotNull(messages);
assertEquals(1, messages.size());
this._mailManager.sendMail(MAIL_TEXT, "Mail with void attachment & text plain",
IMailManager.CONTENTTYPE_TEXT_PLAIN, null, null, null, JpmailTestHelper.MAIL_ADDRESSES, SENDER_CODE);
messages = messageHandler.getMessages();
assertNotNull(messages);
assertEquals(2, messages.size());
}