@Override
    public void putAll(@Nonnull Map<UUID, Long> reservedCapacityPerTxnId) {
        for (Long count : reservedCapacityPerTxnId.values()) {
            nodeWideUsedCapacityCounter.add(count);
        }
        reservedCapacityCountByTxId.putAll(reservedCapacityPerTxnId);
    }
@Test
    public void putAll() {
        UUID txnId1 = UuidUtil.newSecureUUID();
        UUID txnId2 = UuidUtil.newSecureUUID();
        UUID txnId3 = UuidUtil.newSecureUUID();

        Map<UUID, Long> givenCountPerTxnId = new HashMap<>();
        givenCountPerTxnId.put(txnId1, 11L);
        givenCountPerTxnId.put(txnId2, 12L);
        givenCountPerTxnId.put(txnId3, 13L);

        // batch increment with a map of counts.
        counter.putAll(givenCountPerTxnId);

        Map<UUID, Long> countPerTxnId = counter.getReservedCapacityCountPerTxnId();
        long count1 = countPerTxnId.get(txnId1);
        long count2 = countPerTxnId.get(txnId2);
        long count3 = countPerTxnId.get(txnId3);

        assertEquals(11L, count1);
        assertEquals(12L, count2);
        assertEquals(13L, count3);
        assertEquals(11L + 12L + 13L, nodeWideUsedCapacityCounter.currentValue());
    }