### Question:
CollectionUtils { public static List<Float> listFromFloatArray(final float[] arr) { if (arr == null) throw new NullPointerException("array cannot be null"); return new AbstractList<Float>() { @Override public Float get(int index) { return arr[index]; } @Override public int size() { return arr.length; } }; } private  CollectionUtils(); static List<Float> listFromFloatArray(final float[] arr); static List<Double> listFromDoubleArray(final double[] arr); @SafeVarargs /** * Returns a new Set containing the given values */ static Set<T> setOf(T... values);  }### Answer:
@Test public void testListFromFloatArray() { List<Float> floatDataAsList = CollectionUtils.listFromFloatArray(floatData); assertEquals(floatData.length, floatDataAsList.size()); for (int i = 0; i < floatData.length; i++) { assertEquals(floatData[i], floatDataAsList.get(i), delta); } }