diff --git a/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java b/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java index ba12cb6978..af478bce5c 100644 --- a/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java +++ b/src/test/java/org/apache/commons/collections4/iterators/FilterIteratorTest.java @@ -16,7 +16,6 @@ */ package org.apache.commons.collections4.iterators; -import static org.apache.commons.collections4.functors.TruePredicate.truePredicate; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -31,6 +30,7 @@ import org.apache.commons.collections4.Predicate; import org.apache.commons.collections4.functors.NotNullPredicate; +import org.apache.commons.collections4.functors.TruePredicate; import org.apache.commons.lang3.ArrayUtils; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -160,7 +160,7 @@ public void testSetIterator() { final Iterator iter2 = Collections.emptyList().iterator(); final FilterIterator filterIterator = new FilterIterator<>(iter1); - filterIterator.setPredicate(truePredicate()); + filterIterator.setPredicate(TruePredicate.truePredicate()); // this iterator has elements assertTrue(filterIterator.hasNext()); @@ -178,7 +178,7 @@ public void testSetPredicate() { final Iterator iter = Collections.singleton((E) null).iterator(); final FilterIterator filterIterator = new FilterIterator<>(iter); - filterIterator.setPredicate(truePredicate()); + filterIterator.setPredicate(TruePredicate.truePredicate()); // this predicate matches assertTrue(filterIterator.hasNext());