### Question:
MailMessageFactory extends AbstractMessageFactory { @Override public List<Message2Send> getMessage(final MessageProcessUnit inUnit) { return Collections.singletonList((Message2Send) new Message2Send(inUnit.get(), inUnit.getProcessConditioner()) { @Override protected Files[] getBody() { return null; } @Override protected MessageSignature getSignature() { return MessageSignature.MAIL_SIGNATURE; } @Override protected String getTitle() { return MailMessageFactory.TITLE; } @Override protected Palette getColorPal() { return CrawlerSourceMail.MAIL_COLOR_PAL; } @Override protected boolean isStream() { return true; } }); }  @Override List<Message2Send> getMessage(final MessageProcessUnit inUnit);  }### Answer:
@Test public void getMessageWithoutContentTest() { final Subscription theSubscription = new SubscriptionMock(1, Factories.APPLICATION.findByName("net.violet.mail"), getKowalskyObject()); final CCalendar theDeliveryDate = new CCalendar(false); theDeliveryDate.addMillis(3600000L); final MailMessageFactory factory = (MailMessageFactory) AbstractMessageFactory.getFactoryByApplication(theSubscription.getApplication()); try { final SubscriptionData theSubscriptionData = SubscriptionData.getData(theSubscription); final SubscriptionSchedulingData theScheduling = SubscriptionSchedulingData.create(theSubscriptionData, SchedulingType.SCHEDULING_TYPE.Ambiant); final Message2Send message = factory.getMessage(new MessageProcessUnit(theScheduling, theDeliveryDate, null) { @Override public void runWhenSuccessful() { } }).get(0); Assert.assertEquals(Constantes.QUEUE_TTL_SERVICE, message.getTTL()); Assert.assertEquals(MailMessageFactory.TITLE, message.getTitle()); Assert.assertEquals(MailMessageFactory.TITLE, message.getTitle()); Assert.assertEquals(CrawlerSourceMail.MAIL_COLOR_PAL, message.getColorPal()); Assert.assertEquals(theSubscriptionData, message.getSubscription()); Assert.assertEquals(MessageSignature.MAIL_SIGNATURE, message.getSignature()); Assert.assertEquals(theSubscription.getObject(), message.getRecipient()); Assert.assertEquals(JabberMessageFactory.IDLE_MODE, message.getMode()); Assert.assertNull(message.getBody()); Assert.assertTrue(message.isStream()); } catch (final Exception e) { MailMessageFactoryTest.LOGGER.fatal(e, e); Assert.fail(e.getMessage()); } }