@Test public void matchShouldReturnEmptyWhenNoSmtpInformation() throws Exception { Mail mail = FakeMail.builder() .name("mail") .recipient(recipient) .build(); assertThat(testee.match(mail)) .isEmpty(); }
@Override public Collection<MailAddress> match(Mail mail) { return AttributeUtils .getValueAndCastFromMail(mail, SMTP_AUTH_NETWORK_NAME, Boolean.class) .filter(FunctionalUtils.identityPredicate()) .map(any -> mail.getRecipients()) .orElse(ImmutableList.of()); }
SMTPIsAuthNetwork extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { return AttributeUtils .getValueAndCastFromMail(mail, SMTP_AUTH_NETWORK_NAME, Boolean.class) .filter(FunctionalUtils.identityPredicate()) .map(any -> mail.getRecipients()) .orElse(ImmutableList.of()); } }
SMTPIsAuthNetwork extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { return AttributeUtils .getValueAndCastFromMail(mail, SMTP_AUTH_NETWORK_NAME, Boolean.class) .filter(FunctionalUtils.identityPredicate()) .map(any -> mail.getRecipients()) .orElse(ImmutableList.of()); }  }
SMTPIsAuthNetwork extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { return AttributeUtils .getValueAndCastFromMail(mail, SMTP_AUTH_NETWORK_NAME, Boolean.class) .filter(FunctionalUtils.identityPredicate()) .map(any -> mail.getRecipients()) .orElse(ImmutableList.of()); }  @Override Collection<MailAddress> match(Mail mail); static Attribute makeAttribute(Boolean value); }
SMTPIsAuthNetwork extends GenericMatcher { @Override public Collection<MailAddress> match(Mail mail) { return AttributeUtils .getValueAndCastFromMail(mail, SMTP_AUTH_NETWORK_NAME, Boolean.class) .filter(FunctionalUtils.identityPredicate()) .map(any -> mail.getRecipients()) .orElse(ImmutableList.of()); }  @Override Collection<MailAddress> match(Mail mail); static Attribute makeAttribute(Boolean value);  }