diff --git a/src/test/java/org/apache/commons/collections4/ListUtilsTest.java b/src/test/java/org/apache/commons/collections4/ListUtilsTest.java index 4546ec8741..8d232cb4aa 100644 --- a/src/test/java/org/apache/commons/collections4/ListUtilsTest.java +++ b/src/test/java/org/apache/commons/collections4/ListUtilsTest.java @@ -499,6 +499,20 @@ public void testSubtractNullElement() { assertEquals(expected, result); } + @Test + public void testSum() { + final List list1 = new ArrayList<>(); + list1.add(a); + final List list2 = new ArrayList<>(); + list2.add(b); + final List expected1 = new ArrayList<>(); + expected1.add(a); + expected1.add(b); + final List result1 = ListUtils.sum(list1, list2); + assertEquals(2, result1.size()); + assertEquals(expected1, result1); + } + @Test public void testUnion() { final List list1 = new ArrayList<>(); @@ -540,18 +554,4 @@ public void testUnion() { assertEquals(4, result4.size()); assertEquals(expected4, result4); } - - @Test - public void testSum() { - final List list1 = new ArrayList<>(); - list1.add(a); - final List list2 = new ArrayList<>(); - list2.add(b); - final List expected1 = new ArrayList<>(); - expected1.add(a); - expected1.add(b); - final List result1 = ListUtils.sum(list1, list2); - assertEquals(2, result1.size()); - assertEquals(expected1, result1); - } }