### Question:
MergeJoinStepAnalyzer extends StepAnalyzer<MergeJoinMeta> { @Override protected Set<StepField> getUsedFields( MergeJoinMeta meta ) { Set<StepField> usedFields = new HashSet<>(); String[] keyFields1 = meta.getKeyFields1(); String[] keyFields2 = meta.getKeyFields2(); String[] prevStepNames = parentTransMeta.getPrevStepNames( getStepName() ); for ( int i = 0; i < keyFields1.length; i++ ) { String leftField = keyFields1[ i ]; String rightField = keyFields2[ i ]; usedFields.add( new StepField( prevStepNames[0], leftField ) ); usedFields.add( new StepField( prevStepNames[1], rightField ) ); } return usedFields; }  @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 testGetUsedFields() throws Exception { Set<StepField> usedFields = analyzer.getUsedFields( mergeJoinMeta ); assertNotNull( usedFields ); assertEquals( fields1.length + fields2.length, usedFields.size() ); }