@Test
public void testAlternatingIteration() {

    ListIterator<Integer> iter = list.listIterator(50);
    for (int i=0; i<10; i++) {
        Assert.assertTrue(iter.hasNext());
        Assert.assertTrue(iter.hasPrevious());
        Assert.assertEquals(50, iter.nextIndex());
        Assert.assertEquals(49, iter.previousIndex());
        Assert.assertEquals(50, iter.next().intValue());
        Assert.assertTrue(iter.hasNext());
        Assert.assertTrue(iter.hasPrevious());
        Assert.assertEquals(51, iter.nextIndex());
        Assert.assertEquals(50, iter.previousIndex());
        Assert.assertEquals(50, iter.previous().intValue());
    }
}