### Question:
ShermanMorrisonMatrixUpdateFunction implements NewtonRootFinderMatrixUpdateFunction { @Override public DoubleMatrix getUpdatedMatrix( Function<DoubleArray, DoubleMatrix> g, DoubleArray x, DoubleArray deltaX, DoubleArray deltaY, DoubleMatrix matrix) { ArgChecker.notNull(deltaX, "deltaX"); ArgChecker.notNull(deltaY, "deltaY"); ArgChecker.notNull(matrix, "matrix"); DoubleArray v1 = (DoubleArray) _algebra.multiply(deltaX, matrix); double length = _algebra.getInnerProduct(v1, deltaY); if (length == 0) { return matrix; } v1 = (DoubleArray) _algebra.scale(v1, 1. / length); DoubleArray v2 = (DoubleArray) _algebra.subtract(deltaX, _algebra.multiply(matrix, deltaY)); DoubleMatrix m = _algebra.getOuterProduct(v2, v1); return (DoubleMatrix) _algebra.add(matrix, m); } ShermanMorrisonMatrixUpdateFunction(MatrixAlgebra algebra); @Override DoubleMatrix getUpdatedMatrix(
      Function<DoubleArray, DoubleMatrix> g,
      DoubleArray x,
      DoubleArray deltaX,
      DoubleArray deltaY,
      DoubleMatrix matrix);  }### Answer:
@Test public void testNullDeltaX() { assertThatIllegalArgumentException() .isThrownBy(() -> UPDATE.getUpdatedMatrix(J, V, null, V, M)); }
@Test public void testNullDeltaY() { assertThatIllegalArgumentException() .isThrownBy(() -> UPDATE.getUpdatedMatrix(J, V, V, null, M)); }
@Test public void testNullMatrix() { assertThatIllegalArgumentException() .isThrownBy(() -> UPDATE.getUpdatedMatrix(J, V, V, V, null)); }