public static long roundCapacity(long requestedCapacity) {
        if (requestedCapacity > MAX_LONG_CAPACITY) {
            throw new IllegalArgumentException(requestedCapacity + " is greater than max allowed capacity["
                    + MAX_LONG_CAPACITY + "].");
        }

        return Math.max(MIN_CAPACITY, QuickMath.nextPowerOfTwo(requestedCapacity));
    }
@Test(expected = IllegalArgumentException.class)
    public void testRoundCapacity_shouldThrowIfMaximumCapacityIsExceeded() {
        roundCapacity(CapacityUtil.MAX_INT_CAPACITY + 1);
    }