tryToAdd(list,"element2");
tryToAdd(list,"element3");
tryToAdd(list,"element4");
tryToAdd(list,"element5");
Object[] values = list.toArray();
ListIterator iter = list.listIterator();
for(int i=0;i<values.length;i++) {
assertEquals("nextIndex should be " + i,i,iter.nextIndex());
assertEquals("previousIndex should be " + (i-1),i-1,iter.previousIndex());
assertEquals(values[i],iter.next());
}