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

        assertThat(this.node1).as("node2 previous should be node1").isSameAs(this.node2.getPrevious());
        assertThat(this.node3).as("node2 next should be node3").isSameAs(this.node2.getNext());

        this.list.remove( this.node2 );
        assertThat(this.node2.getPrevious()).as("Node2 previous should be null").isNull();
        assertThat(this.node2.getNext()).as("Node2 next should be null").isNull();
        assertThat(this.node1.getPrevious()).as("Node1 previous should be null").isNull();
        assertThat(this.node3).as("node1 next should be node3").isSameAs(this.node1.getNext());

        this.list.remove( this.node1 );
        assertThat(this.node1.getPrevious()).as("Node1 previous should be null").isNull();
        assertThat(this.node1.getNext()).as("Node1 next should be null").isNull();
        assertThat(this.node3.getPrevious()).as("Node3 previous should be null").isNull();
        assertThat(this.node3.getNext()).as("Node3 next should be null").isNull();

        this.list.remove( this.node3 );
        assertThat(this.node3.getPrevious()).as("Node3 previous should be null").isNull();
        assertThat(this.node3.getNext()).as("Node3 next should be null").isNull();
    }