@Test
    void verifySerializeAX509CertificateCredentialToJson() throws IOException {
        MAPPER.findAndRegisterModules();
        val certificate = new CasX509Certificate(true);
        val credentialWritten = new X509CertificateCredential(new X509Certificate[]{certificate});

        MAPPER.writeValue(JSON_FILE, credentialWritten);
        val credentialRead = MAPPER.readValue(JSON_FILE, X509CertificateCredential.class);
        assertEquals(credentialWritten, credentialRead);
    }
Test cases for {@link X509CertificateCredential}.
@author Scott Battaglia
@since 3.0.
support/cas-server-support-x509-core/src/test/java/org/apereo/cas/adaptors/x509/authentication/principal/X509CertificateCredentialTests.java