@Test public void shouldNotMatchAddressesFromDistantDomains() throws MessagingException { Mail mail = FakeMail.builder() .name("mail") .recipients(ANY_AT_JAMES2, OTHER_AT_JAMES2) .build(); assertThat(matcher.match(mail)).isEmpty(); }
@Override public Collection<MailAddress> match(Mail mail) throws MessagingException { return recipientsByDomains(mail) .flatMap(this::hasLocalDomain) .collect(Guavate.toImmutableList()); }
HostIsLocal extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) throws MessagingException { return recipientsByDomains(mail) .flatMap(this::hasLocalDomain) .collect(Guavate.toImmutableList()); } }
HostIsLocal extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) throws MessagingException { return recipientsByDomains(mail) .flatMap(this::hasLocalDomain) .collect(Guavate.toImmutableList()); }  }
HostIsLocal extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) throws MessagingException { return recipientsByDomains(mail) .flatMap(this::hasLocalDomain) .collect(Guavate.toImmutableList()); }  @Override Collection<MailAddress> match(Mail mail); }
HostIsLocal extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) throws MessagingException { return recipientsByDomains(mail) .flatMap(this::hasLocalDomain) .collect(Guavate.toImmutableList()); }  @Override Collection<MailAddress> match(Mail mail);  }