### Question:
ArrayListOfFloats implements RandomAccess, Cloneable, Iterable<Float> { public void addUnique(int[] arr) { for (int i = 0; i < arr.length; i++) { int elt = arr[i]; if (!contains(elt)) { add(elt); } } } ArrayListOfFloats(int initialCapacity);  ArrayListOfFloats();  ArrayListOfFloats(float[] a);  ArrayListOfFloats(int first, int last); void trimToSize(); void ensureCapacity(int minCapacity); int size(); void setSize(int sz); boolean isEmpty(); boolean contains(float n); int indexOf(float n); int lastIndexOf(float n); ArrayListOfFloats clone(); float get(int index); float set(int index, float element); ArrayListOfFloats add(float e); ArrayListOfFloats add(int index, float element); float remove(int index); void clear(); float[] getArray(); Iterator<Float> iterator(); String toString(int n); @Override String toString(); void sort(); ArrayListOfFloats intersection(ArrayListOfFloats other); ArrayListOfFloats merge(ArrayListOfFloats sortedLst); ArrayListOfFloats subList(int start, int end); void addUnique(int[] arr); void shiftLastNToTop(int n); @Override boolean equals(Object obj);  }### Answer:
@Test public void testAddUnique() { ArrayListOfFloats a = new ArrayListOfFloats(new float[] { 1, 2, 3, 4, 5, 6, 7 }); a.addUnique(new int[] { 8, 0, 2, 5, -1, 11, 9 }); assertEquals(12, a.size()); assertTrue(Math.abs(0 - a.get(8)) < 0.0001); assertTrue(Math.abs(-1 - a.get(9)) < 0.0001); assertTrue(Math.abs(11 - a.get(10)) < 0.0001); assertTrue(Math.abs(9 - a.get(11)) < 0.0001); }