diff --git a/src/test/java/org/apache/commons/math/distribution/ExponentialDistributionTest.java b/src/test/java/org/apache/commons/math/distribution/ExponentialDistributionTest.java index e5671e22a..d7ae22051 100644 --- a/src/test/java/org/apache/commons/math/distribution/ExponentialDistributionTest.java +++ b/src/test/java/org/apache/commons/math/distribution/ExponentialDistributionTest.java @@ -116,7 +116,8 @@ public class ExponentialDistributionTest extends ContinuousDistributionAbstractT public void testPreconditions() { try { - ExponentialDistribution distribution = new ExponentialDistributionImpl(0); + new ExponentialDistributionImpl(0); + fail("Should have generated NotStrictlyPositiveException"); } catch (NotStrictlyPositiveException e) { // Expected. } diff --git a/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java b/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java index b717c851a..e9ffe5c1e 100644 --- a/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java +++ b/src/test/java/org/apache/commons/math/distribution/NormalDistributionTest.java @@ -128,7 +128,8 @@ public class NormalDistributionTest extends ContinuousDistributionAbstractTest public void testPreconditions() { try { - NormalDistribution distribution = new NormalDistributionImpl(1, 0); + new NormalDistributionImpl(1, 0); + fail("Should have generated NotStrictlyPositiveException"); } catch (NotStrictlyPositiveException e) { // Expected. }