void () { final ArrayList<Integer> list1 = new ArrayList<>(Collections.singletonList(1)); final Iterator<Integer> iterator = compose(Collections.singletonList(list1.iterator())); iterator.next(); iterator.remove(); assertTrue(list1.isEmpty()); }