public static SSLFactory createSSLFactoryAndEnableAutoRenewalWhenUsingFileStores(TlsConfig tlsConfig) {
    return createSSLFactoryAndEnableAutoRenewalWhenUsingFileStores(tlsConfig, () -> false);
  }
@Test
  public void createSSLFactoryAndEnableAutoRenewalWhenUsingFileStoresWithPinotInsecureMode()
      throws IOException, URISyntaxException, InterruptedException {
    TlsConfig tlsConfig = createTlsConfig();
    SSLFactory sslFactory =
        RenewableTlsUtils.createSSLFactoryAndEnableAutoRenewalWhenUsingFileStores(tlsConfig, () -> true);
    ensurSslFactoryUseUnsafeTrustManager(sslFactory);

    updateTlsFilesAndWaitForSslFactoryToBeRenewed();

    // after tls file update, the ssl factory should still use UnsafeX509ExtendedTrustManager
    ensurSslFactoryUseUnsafeTrustManager(sslFactory);
  }