public RowMetaInterface getStepFields( String stepname ) throws KettleStepException {
    StepMeta stepMeta = findStep( stepname );
    if ( stepMeta != null ) {
      return getStepFields( stepMeta );
    } else {
      return null;
    }
  }
@Test
  public void infoStepFieldsAreNotIncludedInGetStepFields() throws KettleStepException {
    // validates that the fields from info steps are not included in the resulting step fields for a stepMeta.
    //  This is important with steps like StreamLookup and Append, where the previous steps may or may not
    //  have their fields included in the current step.

    TransMeta transMeta = new TransMeta( new Variables() );
    StepMeta toBeAppended1 = testStep( "toBeAppended1",
      emptyList(),  // no info steps
      asList( "field1", "field2" )  // names of fields from this step
    );
    StepMeta toBeAppended2 = testStep( "toBeAppended2", emptyList(), asList( "field1", "field2" ) );

    StepMeta append = testStep( "append",
      asList( "toBeAppended1", "toBeAppended2" ),  // info step names
      singletonList( "outputField" )   // output field of this step
    );
    StepMeta after = new StepMeta( "after", new DummyTransMeta() );

    wireUpTestTransMeta( transMeta, toBeAppended1, toBeAppended2, append, after );

    RowMetaInterface results = transMeta.getStepFields( append, after, mock( ProgressMonitorListener.class ) );

    assertThat( 1, equalTo( results.size() ) );
    assertThat( "outputField", equalTo( results.getFieldNames()[ 0 ] ) );
  }