@Test public void shouldMatchWhenInvalidAddress() throws MessagingException { fakeMail = FakeMail.builder() .name("name") .recipient(testRecipient) .remoteAddr("invalid") .build(); Collection<MailAddress> actual = matcher.match(fakeMail); assertThat(actual).containsOnly(testRecipient); }
@Override public Collection<MailAddress> match(Mail mail) { if (! matchNetwork(mail.getRemoteAddr())) { return mail.getRecipients(); } return null; }
RemoteAddrNotInNetwork extends AbstractNetworkMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (! matchNetwork(mail.getRemoteAddr())) { return mail.getRecipients(); } return null; } }
RemoteAddrNotInNetwork extends AbstractNetworkMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (! matchNetwork(mail.getRemoteAddr())) { return mail.getRecipients(); } return null; }  }
RemoteAddrNotInNetwork extends AbstractNetworkMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (! matchNetwork(mail.getRemoteAddr())) { return mail.getRecipients(); } return null; }  @Override Collection<MailAddress> match(Mail mail); }
RemoteAddrNotInNetwork extends AbstractNetworkMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (! matchNetwork(mail.getRemoteAddr())) { return mail.getRecipients(); } return null; }  @Override Collection<MailAddress> match(Mail mail);  }