### Question:
JacobianEstimateInitializationFunction implements NewtonRootFinderMatrixInitializationFunction { @Override public DoubleMatrix getInitializedMatrix( Function<DoubleArray, DoubleMatrix> jacobianFunction, DoubleArray x) { ArgChecker.notNull(jacobianFunction, "Jacobian Function"); ArgChecker.notNull(x, "x"); return jacobianFunction.apply(x); }  @Override DoubleMatrix getInitializedMatrix(
      Function<DoubleArray, DoubleMatrix> jacobianFunction,
      DoubleArray x);  }### Answer:
@Test public void testNullFunction() { assertThatIllegalArgumentException() .isThrownBy(() -> ESTIMATE.getInitializedMatrix(null, X)); }
@Test public void testNullVector() { assertThatIllegalArgumentException() .isThrownBy(() -> ESTIMATE.getInitializedMatrix(J, null)); }
@Test public void test() { DoubleMatrix m1 = ESTIMATE.getInitializedMatrix(J, X); DoubleMatrix m2 = J.apply(X); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { assertThat(m1.get(i, j)).isCloseTo(m2.get(i, j), offset(1e-9)); } } }