@Test
    void createX509Credential() throws IOException {
        val requestBody = new LinkedMultiValueMap<String, String>();
        @Cleanup
        val scan = new Scanner(new ClassPathResource("ldap-crl.crt").getFile(), StandardCharsets.UTF_8);
        val certStr = scan.useDelimiter("\\Z").next();
        scan.close();
        requestBody.add("cert", certStr);
        val cred = factory.fromRequest(new MockHttpServletRequest(), requestBody).getFirst();
        assertInstanceOf(X509CertificateCredential.class, cred);
    }
Unit tests for {@link X509RestMultipartBodyCredentialFactory}.

@author Dmytro Fedonin
@since 5.1.0
support/cas-server-support-rest-x509/src/test/java/org/apereo/cas/support/x509/rest/X509RestMultipartBodyCredentialFactoryTests.java