@Test public void matchShouldNotMatchMultiRecipientsEMail() throws MessagingException { FakeMail fakeMail = FakeMail.builder().name("mail").recipients(ANY_AT_JAMES, OTHER_AT_JAMES).build(); assertThat(matcher.match(fakeMail)).isNull(); }
@Override public Collection<MailAddress> match(Mail mail) { if (mail.getRecipients().size() == 1) { return mail.getRecipients(); } else { return null; } }
IsSingleRecipient extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (mail.getRecipients().size() == 1) { return mail.getRecipients(); } else { return null; } } }
IsSingleRecipient extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (mail.getRecipients().size() == 1) { return mail.getRecipients(); } else { return null; } }  }
IsSingleRecipient extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (mail.getRecipients().size() == 1) { return mail.getRecipients(); } else { return null; } }  @Override Collection<MailAddress> match(Mail mail); }
IsSingleRecipient extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (mail.getRecipients().size() == 1) { return mail.getRecipients(); } else { return null; } }  @Override Collection<MailAddress> match(Mail mail);  }