Code example for ListIterator

Methods: next, remove

0
    } 
 
    @Test(expected = UnsupportedOperationException.class) 
    public void testListIteratorRemove() { 
        ListIterator<Integer> itr = createList().listIterator();
        itr.next();
        itr.remove();
    } 
 
    @Test(expected = UnsupportedOperationException.class) 
    public void testListIteratorAdd() { 
        ListIterator<Integer> itr = createList().listIterator();
        itr.next();
        itr.add(100);
    } 
 
    @Test(expected = UnsupportedOperationException.class) 
    public void testListIteratorSet() { 
        ListIterator<Integer> itr = createList().listIterator();
        itr.next();
        itr.set(100);