### Question:
MergeJoinStepAnalyzer extends StepAnalyzer<MergeJoinMeta> { @Override public Map<String, RowMetaInterface> getInputFields( MergeJoinMeta meta ) { Map<String, RowMetaInterface> rowMeta = null; try { validateState( null, meta ); } catch ( MetaverseAnalyzerException e ) { } if ( parentTransMeta != null ) { rowMeta = new HashMap<>(); try { StepMeta stepMeta1 = meta.getStepIOMeta().getInfoStreams().get( 0 ).getStepMeta(); ProgressNullMonitorListener progress = new ProgressNullMonitorListener(); leftStepFields = parentTransMeta.getStepFields( stepMeta1, progress ); progress.done(); progress = new ProgressNullMonitorListener(); StepMeta stepMeta2 = meta.getStepIOMeta().getInfoStreams().get( 1 ).getStepMeta(); rightStepFields = parentTransMeta.getStepFields( stepMeta2, progress ); progress.done(); rowMeta.put( stepMeta1.getName(), leftStepFields ); rowMeta.put( stepMeta2.getName(), rightStepFields ); } catch ( Throwable t ) { } } return rowMeta; }  @Override Set<ComponentDerivationRecord> getChangeRecords( MergeJoinMeta meta ); @Override Map<String, RowMetaInterface> getInputFields( MergeJoinMeta meta ); @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps(); @Override IClonableStepAnalyzer newInstance();  }### Answer:
@Test public void testGetInputFields() throws Exception { doNothing().when( analyzer ).validateState( null, mergeJoinMeta ); when( mergeJoinMeta.getStepIOMeta() ).thenReturn( ioMetaInterface ); List<StreamInterface> infoStreams = mock( List.class ); when( ioMetaInterface.getInfoStreams() ).thenReturn( infoStreams ); StreamInterface leftStream = mock( StreamInterface.class ); StreamInterface rightStream = mock( StreamInterface.class ); when( infoStreams.get( 0 ) ).thenReturn( leftStream ); when( infoStreams.get( 1 ) ).thenReturn( rightStream ); StepMeta leftStepMeta = mock ( StepMeta.class ); StepMeta rightStepMeta = mock ( StepMeta.class ); when( leftStream.getStepMeta() ).thenReturn( leftStepMeta ); when( rightStream.getStepMeta() ).thenReturn( rightStepMeta ); RowMetaInterface leftRmi = mock( RowMetaInterface.class ); RowMetaInterface rightRmi = mock( RowMetaInterface.class ); when( parentTransMeta.getStepFields( eq( leftStepMeta ), any( ProgressMonitorListener.class ) ) ).thenReturn( leftRmi ); when( parentTransMeta.getStepFields( eq( rightStepMeta ), any( ProgressMonitorListener.class ) ) ).thenReturn( rightRmi ); when( leftStepMeta.getName() ).thenReturn( "left" ); when( rightStepMeta.getName() ).thenReturn( "right" ); Map<String, RowMetaInterface> inputFields = analyzer.getInputFields( mergeJoinMeta ); assertNotNull( inputFields ); assertEquals( 2, inputFields.size() ); assertTrue( inputFields.containsKey( "left" ) ); assertTrue( inputFields.containsKey( "right" ) ); assertEquals( leftRmi, inputFields.get( "left" ) ); assertEquals( rightRmi, inputFields.get( "right" ) ); }