### Question:
ArrayListOfInts implements RandomAccess, Cloneable, Iterable<Integer> { public ArrayListOfInts add(int e) { ensureCapacity(size + 1); array[size++] = e; return this; } 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 testIterable() { int size = 1000; Random r = new Random(); int[] ints = new int[size]; ArrayListOfInts list = new ArrayListOfInts(); for (int i = 0; i < size; i++) { int k = r.nextInt(size); list.add(k); ints[i] = k; } int i = 0; for (Integer v : list) { assertEquals(ints[i++], (int) v); } }