private void verifyCommonRequestCostHeaders(HttpResponse response, double expectedCuCost, double expectedStorageCost,
      boolean isRead) {
    String cuUnitName = isRead ? QuotaName.READ_CAPACITY_UNIT.name() : QuotaName.WRITE_CAPACITY_UNIT.name();
    Assert.assertTrue("Request cost header should be present",
        response.headers().contains(RestUtils.RequestCostHeaders.REQUEST_COST));
    Map<String, String> costMap = RestUtils.KVHeaderValueEncoderDecoder.decodeKVHeaderValue(
        response.headers().get(RestUtils.RequestCostHeaders.REQUEST_COST));
    Assert.assertEquals("There should be two entries in request cost map", 2, costMap.size());
    Assert.assertTrue(cuUnitName + " should be present in cost map", costMap.containsKey(cuUnitName));
    Assert.assertTrue(QuotaName.STORAGE_IN_GB.name() + " should be present in cost map",
        costMap.containsKey(QuotaName.STORAGE_IN_GB.name()));
    Assert.assertEquals("Invalid " + QuotaName.STORAGE_IN_GB.name() + " cost.", expectedStorageCost,
        Double.parseDouble(costMap.get(QuotaName.STORAGE_IN_GB.name())), 0.000001);
    Assert.assertEquals("Invalid " + cuUnitName + " cost.", expectedCuCost, Double.parseDouble(costMap.get(cuUnitName)),
        0.000001);
  }
Verify the request cost headers were attached to the response properly.
@param response the {@link HttpResponse} to be verified.
ambry-frontend/src/integration-test/java/com/github/ambry/frontend/FrontendIntegrationTestBase.java