### Question:
ArrayUtil { public static double[] fill(double value, int length) { double[] data = new double[length]; Arrays.fill(data, value); return data; } private  ArrayUtil(); static boolean binarySearch(int[] arr, int length, int key); static int binarySearchIndex(int[] arr, int length, int key); static boolean linearSearch2(int[] arr, int low, int high, int key); static int linearSearch2index(int[] arr, int low, int high, int key); static boolean linearSearch(int[] arr, int length, int key); static int linearSearchIndex(int[] arr, int length, int key); static int binaryLookup(long id, long[] ids); static double[] floatToDoubleArray(float[] floats); static double[] fill(double value, int length); static final int MAX_ARRAY_LENGTH; static final int LINEAR_SEARCH_LIMIT; }### Answer:
@Test void fillsAnArray() { assertArrayEquals(new double[]{1D, 1D, 1D}, ArrayUtil.fill(1D, 3)); assertArrayEquals(new double[]{}, ArrayUtil.fill(1D, 0)); assertArrayEquals(new double[]{42D}, ArrayUtil.fill(42D, 1)); }