public void init(PinotConfiguration pinotConfiguration) {
    Preconditions.checkArgument(0 < Integer.parseInt(pinotConfiguration.getProperty(MAX_RETRY)),
        "[AzureEnvironmentProvider]: " + MAX_RETRY + " cannot be less than or equal to 0");
    Preconditions.checkArgument(!StringUtils.isBlank(pinotConfiguration.getProperty(IMDS_ENDPOINT)),
        "[AzureEnvironmentProvider]: " + IMDS_ENDPOINT + " should not be null or empty");

    _maxRetry = Integer.parseInt(pinotConfiguration.getProperty(MAX_RETRY));
    _imdsEndpoint = pinotConfiguration.getProperty(IMDS_ENDPOINT);
    int connectionTimeoutMillis = Integer.parseInt(pinotConfiguration.getProperty(CONNECTION_TIMEOUT_MILLIS));
    int requestTimeoutMillis = Integer.parseInt(pinotConfiguration.getProperty(REQUEST_TIMEOUT_MILLIS));

    final RequestConfig requestConfig =
        RequestConfig.custom().setConnectTimeout(Timeout.of(connectionTimeoutMillis, TimeUnit.MILLISECONDS))
            .setResponseTimeout(Timeout.of(requestTimeoutMillis, TimeUnit.MILLISECONDS)).build();

    final HttpRequestRetryStrategy httpRequestRetry = new DefaultHttpRequestRetryStrategy(
        _maxRetry,
        TimeValue.ofSeconds(1));

    _closeableHttpClient =
        HttpClients.custom().setDefaultRequestConfig(requestConfig).setRetryStrategy(httpRequestRetry).build();
  }
@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp =
      "\\[AzureEnvironmentProvider\\]: maxRetry cannot be less than " + "or equal to 0")
  public void testInvalidRetryCount() {
    Map<String, Object> map = _pinotConfiguration.toMap();
    map.put(MAX_RETRY, "0");
    PinotConfiguration pinotConfiguration = new PinotConfiguration(map);
    _azureEnvironmentProvider.init(pinotConfiguration);
  }