public void testIteratorPastEnds() {
        int size = 10;
        Data[] data = new Data[size];
        for ( int i = 0; i < data.length; i++ ) {
            data[i] = new Data( i );
            list.add( data[i] );
        }

        ListIterator<Data> iter = list.listIterator();
        Data current = list.getFirst();
        while( iter.hasNext() ) {
            assertEquals( current, list.get( iter.nextIndex() ) );
            assertEquals( current, iter.next() );
            Data test = list.getNext( current );
            if ( test != null  ) {
                current = test;
            }
        }

        // Now at end of the list;
        assertEquals( current, list.getLast() );
        assertFalse( iter.hasNext() );
        assertNull( list.getNext( current ) );

        try {
            iter.next();
            fail( "Expected NoSuchElementException" );
        }
        catch ( NoSuchElementException ex ) {
            // Expected
        }

        /// Start end and work to the front.
        current = list.getLast();
        iter = list.listIterator( list.size() );
        while ( iter.hasPrevious() ) {
            assertEquals( current, list.get( iter.previousIndex() ) );
            assertEquals( current, iter.previous() );
            Data test = list.getPrevious( current );
            if ( test != null  ) {
                current = test;
            }
        }

        // Now at front of the list;
        assertEquals( current, list.getFirst() );
        assertFalse( iter.hasPrevious() );
        assertNull( list.getPrevious( current ) );

        try {
            iter.previous();
            fail( "Expected NoSuchElementException" );
        }
        catch ( NoSuchElementException ex ) {
            // Expected
        }
    }