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
    public void testRoundCapacity() {
        int capacity = 2342;

        int roundedCapacity = roundCapacity(capacity);

        assertEquals(4096, roundedCapacity);
    }