@Test public void reallocate_givenToBig_thenDecreasesElements() throws Exception { int[] elements = {1, 2, 3, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13}; setElements(elements); reallocate(new NonEmptyInterval(0, 2), 3); assertElements(1, 2, 3, 0, 0, 0); }
private void reallocate(Interval usage, int lengthNew) { }
DynamicArray { private void reallocate(Interval usage, int lengthNew) { } }
DynamicArray { private void reallocate(Interval usage, int lengthNew) { } DynamicArray(int growthFactor, int maxOverhead); }
DynamicArray { private void reallocate(Interval usage, int lengthNew) { } DynamicArray(int growthFactor, int maxOverhead); int getInnerLength(); Interval reportUsage(Interval usage, int minSize); int get(int index); void set(int index, int value); }
DynamicArray { private void reallocate(Interval usage, int lengthNew) { } DynamicArray(int growthFactor, int maxOverhead); int getInnerLength(); Interval reportUsage(Interval usage, int minSize); int get(int index); void set(int index, int value);  }