### Question:
ArrayOperations { public static double[] reverse(double[] array) { double[] newArray = new double[array.length]; for (int i = 0; i < array.length; i++) { newArray[i] = array[array.length - 1 - i]; } return newArray; }  static double[] padArrayWithZerosToSize(double[] array, int newSize); static double[] convolve(double[] array1, double[] array2); static double[] reverse(double[] array); static double[] trimArrayToSize(double[] array, int size); static double[] removeFirstElements(double[] array, int numberOfElements); static Complex[] convertDoubleArrayToComplex(double[] input); static void fillArrayWithValue(double[] array, double value, int startIndex, int endIndex);  }### Answer:
@Test public void testReverse() { double[] array = new double[] {1, 2, 3, 4, 5}; assertArrayEquals(ArrayOperations.reverse(array), new double[] {5, 4, 3, 2, 1}, 0.001); }