public T removeFirst() {
        if ( this.firstNode == null ) {
            return null;
        }
        final T node = this.firstNode;
        this.firstNode = node.getNext();
        node.setNext( null );
        if ( this.firstNode != null ) {
            this.firstNode.setPrevious( null );
        } else {
            this.lastNode = null;
        }
        this.size--;
        return node;
    }
@Test
    public void testRemoveFirst() {
        this.list.add( this.node1 );
        this.list.add( this.node2 );
        this.list.add( this.node3 );

        assertThat(this.node1).as("First node should be node1").isSameAs(this.list.getFirst());
        this.list.removeFirst();
        assertThat(this.node2).as("List should return node2 on getFirst()").isSameAs(this.list.getFirst());

        this.list.removeFirst();
        assertThat(this.node3).as("List should return node3 on getFirst()").isSameAs(this.list.getFirst());

        this.list.removeFirst();
        assertThat(this.list.getFirst()).as("Empty list should return null on getFirst()").isNull();
    }