@Test void parseDomainsListShouldParseWhenMixedPatterns() { Collection<Domain> senderHosts = matcher.parseDomainsList("james.apache.org james2.apache.org,james3.apache.org, james4.apache.org james5.apache.org"); assertThat(senderHosts).containsOnly( Domain.of("james.apache.org"), Domain.of("james2.apache.org"), Domain.of("james3.apache.org"), Domain.of("james4.apache.org"), Domain.of("james5.apache.org")); }
@VisibleForTesting Collection<Domain> parseDomainsList(String condition) { return Splitter.onPattern("(, |,| )") .omitEmptyStrings() .splitToList(condition) .stream() .map(Domain::of) .collect(Guavate.toImmutableList()); }
SenderHostIs extends GenericMatcher { @VisibleForTesting Collection<Domain> parseDomainsList(String condition) { return Splitter.onPattern("(, |,| )") .omitEmptyStrings() .splitToList(condition) .stream() .map(Domain::of) .collect(Guavate.toImmutableList()); } }
SenderHostIs extends GenericMatcher { @VisibleForTesting Collection<Domain> parseDomainsList(String condition) { return Splitter.onPattern("(, |,| )") .omitEmptyStrings() .splitToList(condition) .stream() .map(Domain::of) .collect(Guavate.toImmutableList()); }  }
SenderHostIs extends GenericMatcher { @VisibleForTesting Collection<Domain> parseDomainsList(String condition) { return Splitter.onPattern("(, |,| )") .omitEmptyStrings() .splitToList(condition) .stream() .map(Domain::of) .collect(Guavate.toImmutableList()); }  @Override void init(); @Override Collection<MailAddress> match(Mail mail); }
SenderHostIs extends GenericMatcher { @VisibleForTesting Collection<Domain> parseDomainsList(String condition) { return Splitter.onPattern("(, |,| )") .omitEmptyStrings() .splitToList(condition) .stream() .map(Domain::of) .collect(Guavate.toImmutableList()); }  @Override void init(); @Override Collection<MailAddress> match(Mail mail);  }