### Question:
HugeLongDoubleMap implements Iterable<LongDoubleCursor> { public void addTo(long key, double value) { addTo0(1L + key, value); } HugeLongDoubleMap(AllocationTracker tracker);  HugeLongDoubleMap(long expectedElements, AllocationTracker tracker); static MemoryEstimation memoryEstimation(); long sizeOf(); void addTo(long key, double value); double getOrDefault(long key, double defaultValue); long size(); boolean isEmpty(); void clear(); void release(); @Override Iterator<LongDoubleCursor> iterator(); @Override String toString();  }### Answer:
@Test void resizeOnGrowthAndTrackMemoryUsage() { long firstSize = sizeOfLongArray(8) + sizeOfDoubleArray(8); long secondSize = sizeOfLongArray(16) + sizeOfDoubleArray(16); long thirdSize = sizeOfLongArray(32) + sizeOfDoubleArray(32); AllocationTracker tracker = AllocationTracker.create(); HugeLongDoubleMap map = new HugeLongDoubleMap(tracker); for (long i = 0L; i < 6L; i++) { map.addTo(i, i + 42L); assertEquals(firstSize, tracker.trackedBytes()); } for (long i = 6L; i < 12L; i++) { map.addTo(i, i + 42L); assertEquals(secondSize, tracker.trackedBytes()); } for (long i = 12L; i < 24L; i++) { map.addTo(i, i + 42L); assertEquals(thirdSize, tracker.trackedBytes()); } }