private static void overrideDefaultTrustStore(Path keyStorePath,
        DefaultLdapComponent ldapComponent) throws Exception {
        SSLUtil.setEnabledSSLProtocols(
            new ArrayList<String>(){{
                add("TLSv1.3");
                add("TLSv1.2");
                add("TLSv1.1");
                add("TLSv1");
                add("SSLv3");
            }}
        );
        // Load the generated test keystore as Apiman's current TrustStore
        SSLUtil sslUtil = new SSLUtil(new TrustStoreTrustManager(
            keyStorePath.toFile(), LDAP_KEYSTORE_PASSWD.toCharArray(), "JKS", false
        ));
        SSLSocketFactory testSocketFactory = sslUtil.createSSLSocketFactory();
        ldapComponent.setSocketFactory(testSocketFactory);

        // Load generated Keystore in ldaps server
        ldapServer.setKeystoreFile(keyStorePath.toString());
        ldapServer.setCertificatePassword(LDAP_KEYSTORE_PASSWD);
        ldapServer.reloadSslContext();
    }
Override the default trust store by generating a new trust manager with our store in it (rather than
defaults, and/or those loaded at startup via environment variables).
gateway/engine/policies/src/test/java/io/apiman/gateway/engine/policies/BasicAuthLDAPSTest.java