public ConsumptionRateLimiter createServerRateLimiter(PinotConfiguration serverConfig, ServerMetrics serverMetrics) {
    double serverRateLimit =
        serverConfig.getProperty(CommonConstants.Server.CONFIG_OF_SERVER_CONSUMPTION_RATE_LIMIT,
            CommonConstants.Server.DEFAULT_SERVER_CONSUMPTION_RATE_LIMIT);
    if (serverRateLimit <= 0) {
      LOGGER.warn("Invalid server consumption rate limit: {}, throttling is disabled", serverRateLimit);
      _serverRateLimiter = NOOP_RATE_LIMITER;
    } else {
      LOGGER.info("A server consumption rate limiter is set up with rate limit: {}", serverRateLimit);
      MetricEmitter metricEmitter = new MetricEmitter(serverMetrics, SERVER_CONSUMPTION_RATE_METRIC_KEY_NAME);
      _serverRateLimiter = new RateLimiterImpl(serverRateLimit, metricEmitter);
    }
    return _serverRateLimiter;
  }
@Test
  public void testCreateServerRateLimiter() {
    // Server config 1
    ConsumptionRateLimiter rateLimiter = _consumptionRateManager.createServerRateLimiter(SERVER_CONFIG_1, null);
    assertEquals(5.0, ((RateLimiterImpl) rateLimiter).getRate(), DELTA);

    // Server config 2
    rateLimiter = _consumptionRateManager.createServerRateLimiter(SERVER_CONFIG_2, null);
    assertEquals(2.5, ((RateLimiterImpl) rateLimiter).getRate(), DELTA);

    // Server config 3
    rateLimiter = _consumptionRateManager.createServerRateLimiter(SERVER_CONFIG_3, null);
    assertEquals(rateLimiter, NOOP_RATE_LIMITER);

    // Server config 4
    rateLimiter = _consumptionRateManager.createServerRateLimiter(SERVER_CONFIG_4, null);
    assertEquals(rateLimiter, NOOP_RATE_LIMITER);
  }