### Question:
HugeIntArray extends HugeArray<int[], Integer, HugeIntArray> { public static long memoryEstimation(long size) { assert size >= 0; if (size <= ArrayUtil.MAX_ARRAY_LENGTH) { return sizeOfInstance(SingleHugeIntArray.class) + sizeOfIntArray((int) size); } long sizeOfInstance = sizeOfInstance(PagedHugeIntArray.class); int numPages = numberOfPages(size); long memoryUsed = sizeOfObjectArray(numPages); long pageBytes = sizeOfIntArray(PAGE_SIZE); memoryUsed += (numPages - 1) * pageBytes; int lastPageSize = exclusiveIndexOfPage(size); return sizeOfInstance + memoryUsed + sizeOfIntArray(lastPageSize); }  abstract int get(long index); abstract void set(long index, int value); abstract void or(long index, int value); abstract int and(long index, int value); abstract void addTo(long index, int value); abstract void setAll(LongToIntFunction gen); abstract void fill(int value); @Override abstract long size(); @Override abstract long sizeOf(); @Override abstract long release(); @Override abstract HugeCursor<int[]> newCursor(); @Override abstract void copyTo(final HugeIntArray dest, final long length); @Override final HugeIntArray copyOf(final long newLength, final AllocationTracker tracker); @Override int[] toArray(); @Override LongNodeProperties asNodeProperties(); static HugeIntArray newArray(long size, AllocationTracker tracker); static HugeIntArray of(final int... values); static long memoryEstimation(long size);  }### Answer:
@Test void shouldComputeMemoryEstimation() { assertEquals(40, HugeIntArray.memoryEstimation(0L)); assertEquals(440, HugeIntArray.memoryEstimation(100L)); assertEquals(400_122_070_368L, HugeIntArray.memoryEstimation(100_000_000_000L)); }