@Override
        public QuotaAction checkAndCharge(boolean shouldCheckExceedAllowed, boolean forceCharge, long chunkSize)
            throws QuotaException {
          listenerCalledCount.addAndGet(chunkSize);
          throw new QuotaException("exception during check and charge",
              new RouterException("Quota exceeded.", RouterErrorCode.TooManyRequests), false);
        }
Test for cases where successive update operations are optimized (i.e, metadata chunk is updated last).
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/NonBlockingQuotaTest.java