@VisibleForTesting
  Map<String, Integer> getColumnMappings( TransHistoryLogTab model ) {
    Map<String, Integer> map = new HashMap();

    for ( ColumnInfo ci : model.logDisplayTableView.getColumns() ) {
      for ( int i = 0; i < model.logTableFields.size(); i++ ) {
        if ( ci.getValueMeta().getName().equals( model.logTableFields.get( i ).getFieldName() ) ) {
          map.put( model.logTableFields.get( i ).getFieldName(), i );
          break;
        }
      }
    }

    return map;
  }
@Test
  public void getColumnMappings() {
    TableView view = mock( TableView.class );
    doReturn( getColumnInfo() ).when( view ).getColumns();

    TransHistoryDelegate.TransHistoryLogTab model = mock( TransHistoryDelegate.TransHistoryLogTab.class );
    setInternalState( model, "logDisplayTableView", view );
    setInternalState( model, "logTableFields", getLogTableFields() );

    TransHistoryDelegate history = new TransHistoryDelegate( mock( Spoon.class ), mock( TransGraph.class ) );
    Map<String, Integer> map = history.getColumnMappings( model );

    assertEquals( 0, (int) map.get( "COLUMN_1" ) );
    assertEquals( 1, (int) map.get( "COLUMN_2" ) );
    assertEquals( 2, (int) map.get( "COLUMN_3" ) );
    assertEquals( 4, (int) map.get( "COLUMN_5" ) );
    assertEquals( 5, (int) map.get( "COLUMN_6" ) );
  }