### Question:
MappingInput extends BaseStep implements StepInterface { public void setConnectorSteps( StepInterface[] sourceSteps, List<MappingValueRename> valueRenames, String mappingStepname ) { if ( sourceSteps == null ) { throw new IllegalArgumentException( BaseMessages .getString( PKG, "MappingInput.Exception.IllegalArgumentSourceStep" ) ); } if ( valueRenames == null ) { throw new IllegalArgumentException( BaseMessages .getString( PKG, "MappingInput.Exception.IllegalArgumentValueRename" ) ); } if ( sourceSteps.length != 0 ) { if ( mappingStepname == null ) { throw new IllegalArgumentException( BaseMessages .getString( PKG, "MappingInput.Exception.IllegalArgumentStepName" ) ); } } for ( StepInterface sourceStep : sourceSteps ) { if ( !sourceStep.isMapping() ) { BlockingRowSet rowSet = new BlockingRowSet( getTransMeta().getSizeRowset() ); rowSet.setThreadNameFromToCopy( sourceStep.getStepname(), 0, mappingStepname, 0 ); sourceStep.addRowSetToOutputRowSets( rowSet ); sourceStep.identifyErrorOutput(); addRowSetToInputRowSets( rowSet ); } } data.valueRenames = valueRenames; data.sourceSteps = sourceSteps; } MappingInput( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
      Trans trans ); void setTimeOut( int timeOut ); boolean processRow( StepMetaInterface smi, StepDataInterface sdi ); boolean init( StepMetaInterface smi, StepDataInterface sdi ); void setConnectorSteps( StepInterface[] sourceSteps, List<MappingValueRename> valueRenames,
      String mappingStepname );  }### Answer:
@Test public void testSetConnectorSteps() throws Exception { when( stepMockHelper.transMeta.getSizeRowset() ).thenReturn( 1 ); MappingInputData mappingInputData = new MappingInputData(); MappingInput mappingInput = new MappingInput( stepMockHelper.stepMeta, mappingInputData, 0, stepMockHelper.transMeta, stepMockHelper.trans ); mappingInput.init( stepMockHelper.initStepMetaInterface, mappingInputData ); ValidatorData validatorData = new ValidatorData(); Validator previousStep = new Validator( stepMockHelper.stepMeta, validatorData, 0, stepMockHelper.transMeta, stepMockHelper.trans ); when( stepMockHelper.stepMeta.isDoingErrorHandling() ).thenReturn( true ); StepErrorMeta stepErrorMeta = mock( StepErrorMeta.class ); when( stepErrorMeta.getTargetStep() ).thenReturn( stepMockHelper.stepMeta ); when( stepMockHelper.stepMeta.getName() ).thenReturn( stepName ); when( stepMockHelper.stepMeta.getStepErrorMeta() ).thenReturn( stepErrorMeta ); StepInterface[] si = new StepInterface[] { previousStep }; mappingInput.setConnectorSteps( si, Collections.<MappingValueRename>emptyList(), stepName ); assertEquals( previousStep.getOutputRowSets().size(), 0 ); }