### Question:
LUDecompositionCommons implements Decomposition<LUDecompositionResult> { @Override public LUDecompositionResult apply(DoubleMatrix x) { ArgChecker.notNull(x, "x"); RealMatrix temp = CommonsMathWrapper.wrap(x); LUDecomposition lu = new LUDecomposition(temp); return new LUDecompositionCommonsResult(lu); }  @Override LUDecompositionResult apply(DoubleMatrix x);  }### Answer:
@Test public void testNullObjectMatrix() { assertThatIllegalArgumentException() .isThrownBy(() -> LU.apply((DoubleMatrix) null)); }
@Test public void testRecoverOrginal() { final DecompositionResult result = LU.apply(A); assertThat(result instanceof LUDecompositionResult).isTrue(); final LUDecompositionResult lu = (LUDecompositionResult) result; final DoubleMatrix a = (DoubleMatrix) ALGEBRA.multiply(lu.getL(), lu.getU()); checkEquals((DoubleMatrix) ALGEBRA.multiply(lu.getP(), A), a); }