@Test
public void getU() throws Exception {

    Matrix luDecompositionU = new LUDecomposition(testMatrix).getU();
    assertEquals("Unexpected row size.", testU.rowSize(), luDecompositionU.rowSize());
    assertEquals("Unexpected column size.", testU.columnSize(), luDecompositionU.columnSize());
    for (int i = 0; i < testU.rowSize(); i++)
        for (int j = 0; j < testU.columnSize(); j++)
            assertEquals("Unexpected value at (" + i + "," + j + ").",
                testU.getX(i, j), luDecompositionU.getX(i, j), 0.0000001d);
    luDecompositionU.destroy();
}