diff --git a/src/test/org/apache/commons/collections/TestListUtils.java b/src/test/org/apache/commons/collections/TestListUtils.java index 67883a790..c69652033 100644 --- a/src/test/org/apache/commons/collections/TestListUtils.java +++ b/src/test/org/apache/commons/collections/TestListUtils.java @@ -24,6 +24,7 @@ import java.util.List; import junit.framework.Test; +import org.apache.commons.collections.functors.EqualPredicate; import org.apache.commons.collections.list.PredicatedList; /** @@ -100,6 +101,7 @@ public class TestListUtils extends BulkTest { * Tests intersecting a non-empty list with an subset of iteself. */ public void testIntersectListWithNoOverlapAndDifferentTypes() { + @SuppressWarnings("boxing") final List other = Arrays.asList(1, 23); assertTrue(ListUtils.intersection(fullList, other).isEmpty()); } @@ -235,15 +237,14 @@ public class TestListUtils extends BulkTest { /** * Tests the indexOf method in ListUtils class.. */ - // TODO: Generics public void testIndexOf() { - Predicate testPredicate = PredicateUtils.equalPredicate("d"); + Predicate testPredicate = EqualPredicate.equalPredicate("d"); int index = ListUtils.indexOf(fullList, testPredicate); assertEquals(d, fullList.get(index)); - testPredicate = PredicateUtils.equalPredicate("de"); + testPredicate = EqualPredicate.equalPredicate("de"); index = ListUtils.indexOf(fullList, testPredicate); - assertTrue(index == -1); + assertEquals(index, -1); assertEquals(ListUtils.indexOf(null,testPredicate), -1); assertEquals(ListUtils.indexOf(fullList, null), -1);