docs: private static Collection<X509TrustManager> getTrustManager(final String algorithm, final KeyStore keystore) throws Exception {
          val factory = TrustManagerFactory.getInstance(algorithm);
          factory.init(keystore);
          return Arrays.stream(factory.getTrustManagers())
              .filter(e -> e instanceof X509TrustManager)
              .map(X509TrustManager.class::cast)
              .collect(Collectors.toList());
      }