@Test void shouldBeAbleToMatchSeveralAddresses() throws Exception { matcher.init( FakeMatcherConfig.builder() .matcherName("RecipientDomainIs") .condition( "james.apache.org james3.apache.org james2.apache.org james4.apache.org james5.apache.org") .build()); FakeMail fakeMail = FakeMail.builder() .name("mail") .recipients(ANY_AT_JAMES, OTHER_AT_JAMES2, ANY_AT_JAMES2) .build(); assertThat(matcher.match(fakeMail)).containsOnly(ANY_AT_JAMES, ANY_AT_JAMES2, OTHER_AT_JAMES2); }
@Override public void init() { String condition = getCondition(); Preconditions.checkNotNull(condition, "'condition' should not be null"); recipientDomains = parseDomainsList(condition); }
RecipientDomainIs extends GenericRecipientMatcher { @Override public void init() { String condition = getCondition(); Preconditions.checkNotNull(condition, "'condition' should not be null"); recipientDomains = parseDomainsList(condition); } }
RecipientDomainIs extends GenericRecipientMatcher { @Override public void init() { String condition = getCondition(); Preconditions.checkNotNull(condition, "'condition' should not be null"); recipientDomains = parseDomainsList(condition); }  }
RecipientDomainIs extends GenericRecipientMatcher { @Override public void init() { String condition = getCondition(); Preconditions.checkNotNull(condition, "'condition' should not be null"); recipientDomains = parseDomainsList(condition); }  @Override void init(); @Override boolean matchRecipient(MailAddress recipient); }
RecipientDomainIs extends GenericRecipientMatcher { @Override public void init() { String condition = getCondition(); Preconditions.checkNotNull(condition, "'condition' should not be null"); recipientDomains = parseDomainsList(condition); }  @Override void init(); @Override boolean matchRecipient(MailAddress recipient);  }