diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java index dd8839c4f..a393451a5 100644 --- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java +++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java @@ -280,19 +280,15 @@ public class ShapeTest { // probability should not be 0 () -> assertThrows(IllegalArgumentException.class, () -> new Shape(testFunction, 0.0, 24, 1), "Should have thrown IllegalArgumentException"), - // probability should not be = -1 () -> assertThrows(IllegalArgumentException.class, () -> new Shape(testFunction, -1.0, 24, 1), "Should have thrown IllegalArgumentException"), - // probability should not be < -1 () -> assertThrows(IllegalArgumentException.class, () -> new Shape(testFunction, -1.5, 24, 1), "Should have thrown IllegalArgumentException"), - // probability should not be = 1 () -> assertThrows(IllegalArgumentException.class, () -> new Shape(testFunction, 1.0, 24, 1), "Should have thrown IllegalArgumentException"), - // probability should not be > 1 () -> assertThrows(IllegalArgumentException.class, () -> new Shape(testFunction, 2.0, 24, 1), "Should have thrown IllegalArgumentException") diff --git a/src/test/java/org/apache/commons/collections4/functors/CatchAndRethrowClosureTest.java b/src/test/java/org/apache/commons/collections4/functors/CatchAndRethrowClosureTest.java index 96381aebe..11a771b71 100644 --- a/src/test/java/org/apache/commons/collections4/functors/CatchAndRethrowClosureTest.java +++ b/src/test/java/org/apache/commons/collections4/functors/CatchAndRethrowClosureTest.java @@ -74,13 +74,11 @@ public class CatchAndRethrowClosureTest extends AbstractClosureTest { final Closure closure = generateNoExceptionClosure(); closure.execute(Integer.valueOf(0)); }), - dynamicTest("Closure IOException", () -> { final Closure closure = generateIOExceptionClosure(); final FunctorException thrown = assertThrows(FunctorException.class, () -> closure.execute(Integer.valueOf(0))); assertTrue(thrown.getCause() instanceof IOException); }), - dynamicTest("Closure NullPointerException", () -> { final Closure closure = generateNullPointerExceptionClosure(); assertThrows(NullPointerException.class, () -> closure.execute(Integer.valueOf(0))); diff --git a/src/test/java/org/apache/commons/collections4/iterators/ReverseListIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/ReverseListIteratorTest.java index 42d54164c..7890e6ca0 100644 --- a/src/test/java/org/apache/commons/collections4/iterators/ReverseListIteratorTest.java +++ b/src/test/java/org/apache/commons/collections4/iterators/ReverseListIteratorTest.java @@ -64,7 +64,6 @@ public class ReverseListIteratorTest extends AbstractListIteratorTest { // next() should throw a NoSuchElementException () -> assertThrows(NoSuchElementException.class, () -> it.next(), "NoSuchElementException must be thrown from empty ListIterator"), - // previous() should throw a NoSuchElementException () -> assertThrows(NoSuchElementException.class, () -> it.previous(), "NoSuchElementException must be thrown from empty ListIterator") diff --git a/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java b/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java index 83b07b28b..727751b10 100644 --- a/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java +++ b/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java @@ -152,11 +152,9 @@ public class MultiKeyTest { dynamicTest("Integer[] null", () -> { assertThrows(NullPointerException.class, () -> new MultiKey<>(keys)); }), - dynamicTest("Integer[] null + makeClone true", () -> { assertThrows(NullPointerException.class, () -> new MultiKey<>(keys, true)); }), - dynamicTest("Integer[] null + makeClone false", () -> { assertThrows(NullPointerException.class, () -> new MultiKey<>(keys, false)); }) @@ -229,15 +227,12 @@ public class MultiKeyTest { dynamicTest("0", () -> { assertSame(ONE, mk.getKey(0)); }), - dynamicTest("1", () -> { assertSame(TWO, mk.getKey(1)); }), - dynamicTest("-1", () -> { assertThrows(IndexOutOfBoundsException.class, () -> mk.getKey(-1)); }), - dynamicTest("2", () -> { assertThrows(IndexOutOfBoundsException.class, () -> mk.getKey(2)); })