@Test
    public void testSetFirst() {
        PeekableListIterator<String> it = new PeekableListIterator<String>(strings.listIterator());
        try {
            it.set("kjell");  //this shouldn't work
            fail("shouldn't work");
        } catch (IllegalStateException ise) {
            //nada
        }

        assertEquals("0", it.next());
        it.set("elvis");

        assertEquals(6, strings.size());
        assertEquals("elvis", strings.get(0));
    }
Tests that PeekableListIterator behaves as expected.

@author Einar M R Rosenvinge
document/src/test/java/com/yahoo/document/annotation/PeekableListIteratorTestCase.java