void () { myModel.setAll(new String[]{"1", "2", "3", "4"}); Iterator iterator = myModel.iterator(); final IntList removed = new IntArrayList(); myModel.addListDataListener(new ListDataListener() { @Override public void contentsChanged(ListDataEvent e) { throw new RuntimeException(); } @Override public void intervalAdded(ListDataEvent e) { throw new RuntimeException(); } @Override public void intervalRemoved(ListDataEvent e) { assertEquals(e.getIndex0(), e.getIndex1()); removed.add(e.getIndex0()); } }); iterator.next(); iterator.remove(); assertEquals(1, removed.size()); assertEquals(0, removed.getInt(0)); while (iterator.hasNext()) iterator.next(); assertFalse(iterator.hasNext()); iterator.remove(); assertEquals(2, removed.size()); assertEquals(2, removed.getInt(1)); assertThat(myModel.getItems()).containsExactly("2", "3"); }