EvictingArray { public int capacity() { return capacity; } EvictingArray(int minCapacity, Consumer<T> evictionHandler); T computeIfAbsent(long position, @NotNull final Function<Long, T> supplier); int capacity(); void evictAll();  }
@Test public void testCapacity() { victim = new EvictingArray<>(151, handler); assertEquals(256, victim.capacity()); victim = new EvictingArray<>(CAPACITY, handler); assertEquals(CAPACITY, victim.capacity()); victim = new EvictingArray<>(300, handler); assertEquals(512, victim.capacity()); }