protected static void checkCertificate(final AbstractCRLRevocationChecker checker, final String[] certFiles,
                                           final GeneralSecurityException expected) {
        val certificates = Arrays.stream(certFiles)
            .map(file -> CertUtils.readCertificate(new ClassPathResource(file))).toList();

        if (expected != null) {
            assertNotNull(expected.getMessage());
        }
        assertThrowsOrNot(expected, () -> {
            for (val cert : certificates) {
                checker.check(cert);
            }
        });
    }
Base class for {@link RevocationChecker} unit tests.

@author Marvin S. Addison
@since 3.4.6
support/cas-server-support-x509-core/src/test/java/org/apereo/cas/adaptors/x509/authentication/handler/support/BaseCRLRevocationCheckerTests.java