              (is (true? false) "Expected HTTP connection to HTTPS port to fail")
              (catch EvalFailedException e
                (is (instance? HttpClientException (.. e getCause)))
-               (is (instance? ConnectionClosedException (.. e getCause getCause)))))))))
+               (is (ssl-connection-exception? (.. e getCause getCause)))))))))
 
   (testing "Can connect via TLSv1 by default"
     (with-webserver-with-protocols ["TLSv1"] nil

(def ring-app-with-auth
  (-> ring-app
      (auth/wrap-basic-authentication authenticated?)))

(defn get-http-client-settings
  [options]

            (is (true? false) "Expected HTTP connection to HTTPS port to fail")
            (catch EvalFailedException e
              (is (instance? HttpClientException (.. e getCause)))
              (is (ssl-connection-exception? (.. e getCause getCause)))))))

      (testing "Can connect via SSLv3 when specified"
        (let [sc (create-scripting-container-with-ssl-client
