public void clear() {
//        while ( removeFirst() != null ) {
//        }
        this.firstNode = null;
        this.lastNode = null;
        size = 0;
    }
@Test
    public void testClear() {
        this.list.add( this.node1 );
        this.list.add( this.node2 );
        this.list.add( this.node3 );

        assertThat(this.list.size()).as("List size should be 3").isEqualTo(3);
        this.list.clear();
        assertThat(this.list.size()).as("Empty list should have size 0").isEqualTo(0);
    }