private void assertResourceId(String resourceId, boolean assertForUsage) throws QuotaException {
    if (!cuQuota.containsKey(resourceId)) {
      throw new QuotaException(String.format("Couldn't find quota for resource: %s", resourceId), true);
    }
    if (assertForUsage && !cuUsage.containsKey(resourceId)) {
      throw new QuotaException(String.format("Couldn't find usage information for resource: %s", resourceId), true);
    }
  }
Asserts that the quota for the specified resourceId is present in this quota source. If assertForUsage is set to
true this method also asserts for the presence of usage information of the specified resourceId.
@param resourceId resource id to check.
@param assertForUsage if {@code true} then also assert for presence of usage information.
@throws QuotaException in case quota for the resource is not present in this quota source.
ambry-quota/src/main/java/com/github/ambry/quota/capacityunit/AmbryCUQuotaSource.java