class CertificateValidityChecker {

    public boolean isValid(Certificate certificate) {
        return validate(certificate)
                .map(CertificateValidity::isValid)
                .orElse(false);
    }

    private  CertificateValidityChecker(TrustStoreForCertificateProvider trustStoreForCertificateProvider, CertificateChainValidator certificateChainValidator);

}