class IsRemoteDeliveryTemporaryError extends GenericMatcher {

    @Override
    public Collection<MailAddress> match(Mail mail) {
        return AttributeUtils.getValueAndCastFromMail(mail, IS_DELIVERY_PERMANENT_ERROR, Boolean.class)
            .filter(Predicate.isEqual(false))
            .map(any -> mail.getRecipients())
            .orElse(ImmutableList.of());
    }

}