### Question:
ArrayListOfInts implements RandomAccess, Cloneable, Iterable<Integer> { public void addUnique(int[] arr) { for (int i = 0; i < arr.length; i++) { int elt = arr[i]; if (!contains(elt)) { add(elt); } } } 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 testAddUnique() { ArrayListOfInts a = new ArrayListOfInts(new int[] { 1, 2, 3, 4, 5, 6, 7 }); a.addUnique(new int[] { 8, 0, 2, 5, -1, 11, 9 }); assertEquals(12, a.size()); assertEquals(0, a.get(8)); assertEquals(-1, a.get(9)); assertEquals(11, a.get(10)); assertEquals(9, a.get(11)); }