### Question:
BufferInt extends ListInt { public void addInt(int value) { data[endOffset] = value; endOffset++; if (endOffset == data.length) resize(); } BufferInt();  BufferInt(int initialCapacity); @Override int getInt(int index); @Override int size(); void addInt(int value); void clear(); int getCurrentCapacity();  }### Answer:
@Test public void iteration1() { BufferInt coll = new BufferInt(); for (int i = 0; i < 10; i++) { coll.addInt(1); } testCollection(coll); testList(coll); }
@Test public void add2() { BufferInt coll = new BufferInt(); for (int i = 0; i < 11; i++) { coll.addInt(i); } ListInt reference = new ArrayInt(new int[] {0, 1,2,3,4,5,6,7,8,9,10}); assertThat(coll, equalTo(reference)); }
@Test public void add3() { BufferInt coll = new BufferInt(); for (int i = 0; i < 5; i++) { coll.addInt(i); } ListInt reference = new ArrayInt(new int[] {0,1,2,3,4}); assertThat(coll, equalTo(reference)); }