void () { TestScaleHelper.restoreProperties(); // Clean up the certificate storage if needed var trustManager = CertificateManager.getInstance().getTrustManager().getCustomManager(); if (mySSLInfo != null && mySSLInfo.certificate != null) { for (X509Certificate certificate : mySSLInfo.certificate.getCertificatesChain()) { if (trustManager.containsCertificate(CertificateUtil.getCommonName(certificate))) { trustManager.removeCertificate(certificate); } } } }