public static void validateSslCertificate() {
        final NetworkHttpClient client = new NetworkHttpClient();
        final Request request = new Request(HttpMethod.GET, "https://api.twilio.com:8443");

        try {
            final Response response = client.makeRequest(request);

            if (!TwilioRestClient.SUCCESS.apply(response.getStatusCode())) {
                throw new CertificateValidationException(
                    "Unexpected response from certificate endpoint", request, response
                );
            }
        } catch (final ApiException e) {
            throw new CertificateValidationException("Could not get response from certificate endpoint", request);
        }
    }
public static void validateSslCertificate ( ) { final NetworkHttpClient client = new NetworkHttpClient ( ) ; final Request request = new Request ( HttpMethod . GET , "https://api.twilio.com:8443" ) ; try { final Response response = client . makeRequest ( request ) ; if ( ! TwilioRestClient . SUCCESS . apply ( response . getStatusCode ( ) ) ) { throw new CertificateValidationException ( "Unexpected response from certificate endpoint" , request , response ) ; } } catch ( final ApiException e ) { throw new CertificateValidationException ( "Could not get response from certificate endpoint" , request ) ; } }
Validate that we can connect to the new SSL certificate posted on api.twilio.com.

@throws com.twilio.exception.CertificateValidationException if the connection fails