### Question:
DoubleArrayMath { public static double[] combineLenient(double[] array1, double[] array2, DoubleBinaryOperator operator) { int len1 = array1.length; int len2 = array2.length; if (len1 == len2) { return combine(array1, array2, operator); } int size = Math.max(len1, len2); double[] result = new double[size]; for (int i = 0; i < size; i++) { if (i < len1) { if (i < len2) { result[i] = operator.applyAsDouble(array1[i], array2[i]); } else { result[i] = array1[i]; } } else { result[i] = array2[i]; } } return result; } private  DoubleArrayMath(); static Double[] toObject(double[] array); static double[] toPrimitive(Double[] array); static double sum(double[] array); static double[] applyAddition(double[] array, double valueToAdd); static double[] applyMultiplication(double[] array, double valueToMultiplyBy); static double[] apply(double[] array, DoubleUnaryOperator operator); static void mutateByAddition(double[] array, double valueToAdd); static void mutateByAddition(double[] array, double[] arrayToAdd); static void mutateByMultiplication(double[] array, double valueToMultiplyBy); static void mutateByMultiplication(double[] array, double[] arrayToMultiplyBy); static void mutate(double[] array, DoubleUnaryOperator operator); static double[] combineByAddition(double[] array1, double[] array2); static double[] combineByMultiplication(double[] array1, double[] array2); static double[] combine(double[] array1, double[] array2, DoubleBinaryOperator operator); static double[] combineLenient(double[] array1, double[] array2, DoubleBinaryOperator operator); static boolean fuzzyEqualsZero(double[] array, double tolerance); static boolean fuzzyEquals(double[] array1, double[] array2, double tolerance); static void sortPairs(double[] keys, double[] values); static double[] reorderedCopy(double[] values, int[] positions); static void sortPairs(double[] keys, int[] values); static void sortPairs(double[] keys, V[] values); static final double[] EMPTY_DOUBLE_ARRAY; static final Double[] EMPTY_DOUBLE_OBJECT_ARRAY; }### Answer:
@Test public void test_combineLenient() { DoubleBinaryOperator operator = (a, b) -> a / b; assertThat(DoubleArrayMath.combineLenient(ARRAY_1_2, ARRAY_3_4, operator)).contains(1d / 3d, 2d / 4d); assertThat(DoubleArrayMath.combineLenient(ARRAY_1_2, ARRAY_3, operator)).contains(1d / 3d, 2d); assertThat(DoubleArrayMath.combineLenient(ARRAY_3, ARRAY_1_2, operator)).contains(3d / 1d, 2d); }