@Test void shouldMatchWhenNullSender() throws Exception { FakeMail fakeMail = FakeMail.builder() .name("mail") .recipient(ANY_AT_JAMES) .sender(MailAddress.nullSender()) .build(); assertThat(matcher.match(fakeMail)).containsExactly(ANY_AT_JAMES); }
@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);  }