private static SSLContext disabledSslContext() throws Exception {
        var trustAllCerts = new TrustManager[]{new X509TrustManager() {
            @Override
            public void checkClientTrusted(X509Certificate[] x509Certificates, String s) {
            }

            @Override
            public void checkServerTrusted(X509Certificate[] x509Certificates, String s) {
            }

            @Override
            public X509Certificate[] getAcceptedIssuers() {
                return null;
            }
        }};

        var sc = SSLContext.getInstance("SSL");
        sc.init(null, trustAllCerts, new SecureRandom());
        return sc;
    }
This is {@link SAML2ConfigurationTests}.

@author Misagh Moayyed
pac4j-saml/src/test/java/org/pac4j/saml/config/SAML2ConfigurationTests.java