### Question:
InverseJacobianDirectionFunction implements NewtonRootFinderDirectionFunction { @Override public DoubleArray getDirection(DoubleMatrix estimate, DoubleArray y) { ArgChecker.notNull(estimate, "estimate"); ArgChecker.notNull(y, "y"); return (DoubleArray) _algebra.multiply(estimate, y); } InverseJacobianDirectionFunction(MatrixAlgebra algebra); @Override DoubleArray getDirection(DoubleMatrix estimate, DoubleArray y);  }### Answer:
@Test public void testNullEstimate() { assertThatIllegalArgumentException() .isThrownBy(() -> F.getDirection(null, Y)); }
@Test public void testNullY() { assertThatIllegalArgumentException() .isThrownBy(() -> F.getDirection(M, null)); }
@Test public void test() { double eps = 1e-9; DoubleArray direction = F.getDirection(M, Y); assertThat(direction.get(0)).isCloseTo(X0, offset(eps)); assertThat(direction.get(1)).isCloseTo(X1, offset(eps)); assertThat(direction.get(2)).isCloseTo(X2, offset(eps)); }