public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
    meta = (PrioritizeStreamsMeta) smi;
    data = (PrioritizeStreamsData) sdi;

    if ( first ) {
      if ( meta.getStepName() != null || meta.getStepName().length > 0 ) {
        data.stepnrs = meta.getStepName().length;
        data.rowSets = new RowSet[data.stepnrs];

        for ( int i = 0; i < data.stepnrs; i++ ) {
          data.rowSets[i] = findInputRowSet( meta.getStepName()[i] );
          if ( i > 0 ) {
            // Compare layout of first stream with the current stream
            checkInputLayoutValid( data.rowSets[0].getRowMeta(), data.rowSets[i].getRowMeta() );
          }
        }
      } else {
        // error
        throw new KettleException( BaseMessages.getString( PKG, "PrioritizeStreams.Error.NotInputSteps" ) );
      }
      data.currentRowSet = data.rowSets[0];
    } // end if first, part 1

    Object[] input = getOneRow();

    while ( input == null && data.stepnr < data.stepnrs - 1 && !isStopped() ) {
      input = getOneRow();
    }

    if ( input == null ) {
      // no more input to be expected...
      setOutputDone();
      return false;
    }

    if ( first ) {
      // Take the row Meta from the first rowset read
      data.outputRowMeta = data.currentRowSet.getRowMeta();
      first = false;
    }

    putRow( data.outputRowMeta, input );

    return true;
  }
@Test
  public void testProcessRow() throws KettleException {
    PrioritizeStreamsMeta meta = new PrioritizeStreamsMeta();
    meta.setStepName( new String[] { "high", "medium", "low" } );
    PrioritizeStreamsData data = new PrioritizeStreamsData();

    PrioritizeStreamsInner step = new PrioritizeStreamsInner( stepMockHelper );
    try {
      step.processRow( meta, data );
    } catch ( NullPointerException e ) {
      fail( "NullPointerException detecded, seems that RowMetaInterface was not set for RowSet you are attempting"
          + "to read from." );
    }

    Assert.assertEquals( "First waiting for row set is 'high'", data.currentRowSet.getClass(), SingleRowRowSet.class );
  }