### Question:
Weights { public static double[] buildWeights(List<Number> weightList) { double[] weights = new double[weightList.size()]; int i = 0; for (Number value : weightList) { weights[i++] = value.doubleValue(); } return weights; }  static double[] buildWeights(List<Number> weightList); static double[] buildRleWeights(List<Number> weightList, int limit); static double[] buildRleWeights(double[] weightList, int limit); static final long REPEAT_CUTOFF; }### Answer:
@Test void shouldTransformListToArray() { Number[] values = {1.0, 2.0, 3.0, 4.0}; List<Number> weightList = Arrays.asList(values); assertArrayEquals(new double[]{1.0, 2.0, 3.0, 4.0}, Weights.buildWeights(weightList), 0.01); }