private Map<QuotaName, Double> getCostMap(long chunkSize, RestRequest restRequest) {
    Map<QuotaName, Double> costMap = new HashMap<>();
    for (Map.Entry<String, Double> entry : simpleRequestQuotaCostPolicy.calculateRequestQuotaCharge(restRequest,
        chunkSize).entrySet()) {
      costMap.put(QuotaName.valueOf(entry.getKey()), entry.getValue());
    }
    return costMap;
  }
Helper method to test {@link PreProcessQuotaChargeCallback#checkAndCharge} for all possible parameters.
@param testWithChunkSize {@code true} if checkAndCharge is called with chunkSize param. {@code false} otherwise.
@throws Exception In case of any error
ambry-quota/src/test/java/com/github/ambry/quota/PreProcessQuotaChargeCallbackTest.java