void () { final ArrayList<Integer> list1 = new ArrayList<>(Arrays.asList(1, 2)); final ArrayList<Integer> list2 = new ArrayList<>(Arrays.asList(3, 4)); final ArrayList<Integer> list3 = new ArrayList<>(Arrays.asList(5, 6)); final Iterator<Integer> iterator = compose(Arrays.asList(list1.iterator(), list2.iterator(), list3.iterator())); iterator.next(); iterator.next(); iterator.remove(); iterator.next(); iterator.remove(); assertTrue(list1.size() == 1 && !list1.contains(2)); assertTrue(list2.size() == 1 && !list1.contains(3)); assertEquals(2, list3.size()); }