@VisibleForTesting
  static boolean shouldVerifySslHostname(final Map<String, Object> config) {
    final Object endpointIdentificationAlgoConfig =
        config.get(KsqlConfig.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG);
    if (endpointIdentificationAlgoConfig == null) {
      return false;
    }
    final String endpointIdentificationAlgo = endpointIdentificationAlgoConfig.toString();
    if (endpointIdentificationAlgo.isEmpty() || endpointIdentificationAlgo
        .equalsIgnoreCase(KsqlConfig.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_NONE)) {
      return false;
    } else if (endpointIdentificationAlgo
        .equalsIgnoreCase(KsqlConfig.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_HTTPS)) {
      return true;
    } else {
      throw new ConfigException("Endpoint identification algorithm not supported: "
          + endpointIdentificationAlgo);
    }
  }
@Test
  public void shouldDisableHostnameVerification() {
    // When / Then:
    assertThat(DefaultConnectClientFactory.shouldVerifySslHostname(CONFIGS_WITH_HOSTNAME_VERIFICATION_DISABLED),
        is(false));
  }