static String contactUrl(final String addr, final CasSSLContext context) throws Exception {
            val url = new URI(addr).toURL();
            val connection = (HttpsURLConnection) url.openConnection();
            connection.setRequestMethod("GET");
            connection.setHostnameVerifier(NoopHostnameVerifier.INSTANCE);
            connection.setSSLSocketFactory(context.getSslContext().getSocketFactory());
            try (val is = connection.getInputStream()) {
                return IOUtils.toString(is, StandardCharsets.UTF_8);
            }
        }
This is {@link DefaultCasSSLContextTests}.

@author Misagh Moayyed
@since 6.4.0
core/cas-server-core-authentication/src/test/java/org/apereo/cas/authentication/DefaultCasSSLContextTests.java