public void remove() {

    int index = this.model.getModelObjects().indexOf( this.model.getSelectedItem() );

    if ( index >= 1 ) {
      index -= 1;
    }

    this.model.getModelObjects().remove( this.model.getSelectedItem() );

    if ( !model.getModelObjects().isEmpty() ) {
      this.model.setSelectedItem( model.getModelObjects().get( index ) );
    } else {
      this.model.setSelectedItem( null );
    }

  }
@Test
  public void testRemove() {

    controller.addProviders( providers );
    controller.getModel().setSelectedItem( controller.getModel().getModelObjects().get( 0 ) );
    controller.remove();

    assertEquals( 7, controller.getModel().getModelObjects().size() );
  }