diff --git a/libraries-2/src/test/java/com/baeldung/ejml/SimpleMatrixUnitTest.java b/libraries-2/src/test/java/com/baeldung/ejml/SimpleMatrixUnitTest.java index 0f394889c0..7fba7e00a2 100644 --- a/libraries-2/src/test/java/com/baeldung/ejml/SimpleMatrixUnitTest.java +++ b/libraries-2/src/test/java/com/baeldung/ejml/SimpleMatrixUnitTest.java @@ -34,14 +34,6 @@ class SimpleMatrixUnitTest { SimpleMatrix actual = firstMatrix.mult(secondMatrix); - assertThat(actual.numRows()).isEqualTo(expected.numRows()); - assertThat(actual.numCols()).isEqualTo(expected.numCols()); - for (int row = 0; row < actual.numRows(); row++) { - for (int col = 0; col < actual.numCols(); col++) { - assertThat(actual.get(row, col)) - .describedAs("Cells at [%d, %d] don't match", row, col) - .isEqualTo(expected.get(row, col)); - } - } + assertThat(actual).matches(m -> m.isIdentical(expected, 0d)); } }