@Override
    public void increment(@Nonnull UUID txnId, boolean backup) {
        if (txnId.equals(NULL_UUID)) {
            return;
        }

        reservedCapacityCountByTxId.compute(txnId, (ignored, currentCapacityCount) -> {
            if (backup) {
                nodeWideUsedCapacityCounter.add(1L);
            } else {
                nodeWideUsedCapacityCounter.checkAndAddCapacityOrThrowException(1);
            }
            return currentCapacityCount == null ? 1L : (currentCapacityCount + 1L);
        });
    }
@Test
    public void increment() {
        UUID txnId = UuidUtil.newSecureUUID();
        for (int i = 0; i < 11; i++) {
            counter.increment(txnId, false);
        }

        Map<UUID, Long> countPerTxnId = counter.getReservedCapacityCountPerTxnId();
        long count = countPerTxnId.get(txnId);

        assertEquals(11L, count);
        assertEquals(11L, nodeWideUsedCapacityCounter.currentValue());
    }