private Map<RestMethod, RejectThrottler> createQuotaMock(HostThrottleConfig hostThrottleConfig, Clock clock) {
    JSONObject quota = new JSONObject(hostThrottleConfig.restRequestQuota);
    Map<RestMethod, RejectThrottler> quotaMap = new HashMap<>();
    for (RestMethod restMethod : RestMethod.values()) {
      int restMethodQuota = quota.optInt(restMethod.name(), -1);
      quotaMap.put(restMethod, new RejectThrottler(restMethodQuota, new Meter(clock)));
    }
    return quotaMap;
  }
A helper function to create quotaMap with controllable clock.
ambry-commons/src/test/java/com/github/ambry/commons/HostLevelThrottlerTest.java