@Test public void nullSenderMailsShouldBeConsideredAsAutomaticMails() throws Exception { assertThat( new AutomaticallySentMailDetectorImpl() .isAutomaticallySent(FakeMail.builder() .name("mail") .build())) .isTrue(); }
@Override public boolean isAutomaticallySent(Mail mail) throws MessagingException { return !mail.hasSender() || isMailingList(mail) || isAutoSubmitted(mail) || isMdnSentAutomatically(mail); }
AutomaticallySentMailDetectorImpl implements AutomaticallySentMailDetector { @Override public boolean isAutomaticallySent(Mail mail) throws MessagingException { return !mail.hasSender() || isMailingList(mail) || isAutoSubmitted(mail) || isMdnSentAutomatically(mail); } }
AutomaticallySentMailDetectorImpl implements AutomaticallySentMailDetector { @Override public boolean isAutomaticallySent(Mail mail) throws MessagingException { return !mail.hasSender() || isMailingList(mail) || isAutoSubmitted(mail) || isMdnSentAutomatically(mail); }  }
AutomaticallySentMailDetectorImpl implements AutomaticallySentMailDetector { @Override public boolean isAutomaticallySent(Mail mail) throws MessagingException { return !mail.hasSender() || isMailingList(mail) || isAutoSubmitted(mail) || isMdnSentAutomatically(mail); }  @Override boolean isAutomaticallySent(Mail mail); @Override boolean isMailingList(Mail mail); @Override boolean isAutoSubmitted(Mail mail); @Override boolean isMdnSentAutomatically(Mail mail); }
AutomaticallySentMailDetectorImpl implements AutomaticallySentMailDetector { @Override public boolean isAutomaticallySent(Mail mail) throws MessagingException { return !mail.hasSender() || isMailingList(mail) || isAutoSubmitted(mail) || isMdnSentAutomatically(mail); }  @Override boolean isAutomaticallySent(Mail mail); @Override boolean isMailingList(Mail mail); @Override boolean isAutoSubmitted(Mail mail); @Override boolean isMdnSentAutomatically(Mail mail);  }