@Test
public void getP() throws Exception {

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