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

        assertThat(this.node3).as("Last node should be node3").isSameAs(this.list.getLast());
        
        this.list.removeLast();
        assertThat(this.node2).as("Last node should be node2").isSameAs(this.list.getLast());
        
        this.list.removeLast();
        assertThat(this.node1).as("Last node should be node1").isSameAs(this.list.getLast());

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