### Question:
ArrayListOfInts implements RandomAccess, Cloneable, Iterable<Integer> { public void setSize(int sz) { ensureCapacity(sz); size = sz; } ArrayListOfInts(int initialCapacity);  ArrayListOfInts();  ArrayListOfInts(int[] a);  ArrayListOfInts(int first, int last); void trimToSize(); void ensureCapacity(int minCapacity); int size(); void setSize(int sz); boolean isEmpty(); boolean contains(int n); int indexOf(int n); int lastIndexOf(int n); ArrayListOfInts clone(); int get(int index); int set(int index, int element); ArrayListOfInts add(int e); ArrayListOfInts add(int index, int element); int remove(int index); void clear(); int[] getArray(); Iterator<Integer> iterator(); String toString(int n); @Override String toString(); void sort(); ArrayListOfInts intersection(ArrayListOfInts other); ArrayListOfInts merge(ArrayListOfInts sortedLst); ArrayListOfInts mergeNoDuplicates(ArrayListOfInts sortedLst); ArrayListOfInts subList(int start, int end); void addUnique(int[] arr); void shiftLastNToTop(int n); @Override boolean equals(Object obj);  }### Answer:
@Test public void testSetSize() { ArrayListOfInts list = new ArrayListOfInts(); list.add(5); assertEquals(1, list.size); assertEquals(5, list.get(0)); list.setSize(5); assertEquals(5, list.size); assertEquals(0, list.get(1)); assertEquals(0, list.get(2)); assertEquals(0, list.get(3)); assertEquals(0, list.get(4)); list.add(12); assertEquals(6, list.size); assertEquals(12, list.get(5)); }