### Question:
CollectionUtils { public static List<Double> listFromDoubleArray(final double[] arr) { if (arr == null) throw new NullPointerException("array cannot be null"); return new AbstractList<Double>() { @Override public Double 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 testListFromDoubleArray() { List<Double> doubleDataAsList = CollectionUtils.listFromDoubleArray(doubleData); assertEquals(doubleData.length, doubleDataAsList.size()); for (int i = 0; i < doubleData.length; i++) { assertEquals(doubleData[i], doubleDataAsList.get(i), delta); } }