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