diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/fitting/leastsquares/AbstractLeastSquaresOptimizerAbstractTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/fitting/leastsquares/AbstractLeastSquaresOptimizerAbstractTest.java index d601c865f..00fc3bb88 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/fitting/leastsquares/AbstractLeastSquaresOptimizerAbstractTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/fitting/leastsquares/AbstractLeastSquaresOptimizerAbstractTest.java @@ -39,10 +39,6 @@ import org.junit.Test; import java.io.IOException; import java.util.Arrays; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.CoreMatchers.sameInstance; - /** * Some of the unit tests are re-implementations of the MINPACK file17 and () { @Override public boolean converged(int iteration, Evaluation previous, Evaluation current) { - Assert.assertThat( - previous.getPoint(), - not(sameInstance(current.getPoint()))); + Assert.assertFalse(previous.getPoint().equals(current.getPoint())); Assert.assertArrayEquals(new double[3], previous.getPoint().toArray(), 0); Assert.assertArrayEquals(new double[] {1, 2, 3}, current.getPoint().toArray(), TOL); checked[0] = true; @@ -560,7 +554,7 @@ public abstract class AbstractLeastSquaresOptimizerAbstractTest { }); optimizer.optimize(builder.build()); - Assert.assertThat(checked[0], is(true)); + Assert.assertTrue(checked[0]); } class LinearProblem { diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/fitting/leastsquares/LevenbergMarquardtOptimizerTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/fitting/leastsquares/LevenbergMarquardtOptimizerTest.java index aedeed856..64e8969b3 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/fitting/leastsquares/LevenbergMarquardtOptimizerTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/fitting/leastsquares/LevenbergMarquardtOptimizerTest.java @@ -32,8 +32,6 @@ import org.apache.commons.numbers.core.Precision; import org.junit.Assert; import org.junit.Test; -import static org.hamcrest.CoreMatchers.is; - /** *

Some of the unit tests are re-implementations of the MINPACK file17 and