@Test public void shouldNotMatchWhenNoCondition() throws MessagingException { FakeMatcherConfig matcherConfig = FakeMatcherConfig.builder() .matcherName("") .build(); RemoteAddrInNetwork testee = new RemoteAddrInNetwork(); testee.init(matcherConfig); fakeMail = FakeMail.builder() .name("name") .recipient(testRecipient) .build(); Collection<MailAddress> actual = testee.match(fakeMail); assertThat(actual).isNull(); }
@Override public Collection<MailAddress> match(Mail mail) { if (matchNetwork(mail.getRemoteAddr())) { return mail.getRecipients(); } return null; }
RemoteAddrInNetwork extends AbstractNetworkMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (matchNetwork(mail.getRemoteAddr())) { return mail.getRecipients(); } return null; } }
RemoteAddrInNetwork extends AbstractNetworkMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (matchNetwork(mail.getRemoteAddr())) { return mail.getRecipients(); } return null; }  }
RemoteAddrInNetwork extends AbstractNetworkMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (matchNetwork(mail.getRemoteAddr())) { return mail.getRecipients(); } return null; }  @Override Collection<MailAddress> match(Mail mail); }
RemoteAddrInNetwork extends AbstractNetworkMatcher { @Override public Collection<MailAddress> match(Mail mail) { if (matchNetwork(mail.getRemoteAddr())) { return mail.getRecipients(); } return null; }  @Override Collection<MailAddress> match(Mail mail);  }