diff --git a/java/com.sap.sailing.polars.test/META-INF/MANIFEST.MF b/java/com.sap.sailing.polars.test/META-INF/MANIFEST.MF index eb41ea3aece..d7fddab1bcc 100644 --- a/java/com.sap.sailing.polars.test/META-INF/MANIFEST.MF +++ b/java/com.sap.sailing.polars.test/META-INF/MANIFEST.MF @@ -8,13 +8,8 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Fragment-Host: com.sap.sailing.polars Import-Package: com.sap.sailing.domain.test.mock, com.sap.sse.common, - com.sap.sse.common.impl, - org.hamcrest;version="1.1.0", - org.hamcrest.core;version="1.1.0", - org.hamcrest.number;version="1.1.0", - org.junit;version="4.8.2", - org.junit.runner;version="4.8.2", - org.mockito;version="1.10.14", - org.mockito.stubbing;version="1.10.14" + com.sap.sse.common.impl Require-Bundle: org.hamcrest;bundle-version="1.1.0", - org.hamcrest.core;bundle-version="1.1.0" + org.hamcrest.core;bundle-version="1.1.0", + org.mockito.mockito-core;bundle-version="1.10.14", + org.junit4;bundle-version="4.8.2" diff --git a/java/com.sap.sailing.polars.test/src/com/sap/sailing/polars/test/WindSpeedAndAngleEstimatorTest.java b/java/com.sap.sailing.polars.test/src/com/sap/sailing/polars/test/WindSpeedAndAngleEstimatorTest.java index 5cb803464f7..20157b2a7fc 100644 --- a/java/com.sap.sailing.polars.test/src/com/sap/sailing/polars/test/WindSpeedAndAngleEstimatorTest.java +++ b/java/com.sap.sailing.polars.test/src/com/sap/sailing/polars/test/WindSpeedAndAngleEstimatorTest.java @@ -5,6 +5,7 @@ import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; @@ -203,7 +204,8 @@ public class WindSpeedAndAngleEstimatorTest { .getAverageTrueWindSpeedAndAngleCandidates(new KnotSpeedImpl(4.3)); assertThat(result.size(), is(2)); for (SpeedWithBearingWithConfidence candidate : result) { - assertThat(candidate.getConfidence(), anyOf(closeTo(0.2999999, ERROR), closeTo(0.54, ERROR))); + assertTrue(Math.abs(candidate.getConfidence()-0.2999999)<=ERROR || + Math.abs(candidate.getConfidence()-0.54)<=ERROR); if (Math.abs(candidate.getConfidence() - 0.2999999) < ERROR) { assertThat(candidate.getObject().getKnots(), closeTo(7.8, ERROR)); assertThat(candidate.getObject().getBearing().getDegrees(), closeTo(47.5, ERROR));