@Test void shouldNotMatchWhenSenderIsPresent() throws Exception { FakeMail fakeMail = FakeMail.builder() .name("mail") .recipient(ANY_AT_JAMES) .sender("other@james.apache.org") .build(); assertThat(matcher.match(fakeMail)).isNull(); }
@Override public Collection<MailAddress> match(Mail mail) { if (mail.hasSender()) { return null; } else { return mail.getRecipients(); } }
SenderIsNull extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (mail.hasSender()) { return null; } else { return mail.getRecipients(); } } }
SenderIsNull extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (mail.hasSender()) { return null; } else { return mail.getRecipients(); } }  }
SenderIsNull extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (mail.hasSender()) { return null; } else { return mail.getRecipients(); } }  @Override Collection<MailAddress> match(Mail mail); }
SenderIsNull extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (mail.hasSender()) { return null; } else { return mail.getRecipients(); } }  @Override Collection<MailAddress> match(Mail mail);  }