### Question:
TransExecutorStepAnalyzer extends StepAnalyzer<TransExecutorMeta> { @Override protected Set<StepField> getUsedFields( TransExecutorMeta meta ) { return getInputs().getFieldNames(); } TransExecutorStepAnalyzer(); void connectToSubTransOutputFields( TransExecutorMeta meta, TransMeta subTransMeta,
                                             IMetaverseNode subTransNode,
                                             IComponentDescriptor descriptor ); void connectToSubTransInputFields( TransMeta subTransMeta,
                                            IMetaverseNode subTransNode,
                                            IComponentDescriptor descriptor ); @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps(); @Override IClonableStepAnalyzer newInstance(); static final String EXECUTION_RESULTS_TARGET; static final String OUTPUT_ROWS_TARGET; static final String RESULT_FILES_TARGET; }### Answer:
@Test public void testGetUsedFields() { IMetaverseNode outNode = mock( IMetaverseNode.class ); StepNodes inputs = new StepNodes(); inputs.addNode( "previousStep", "one", outNode ); inputs.addNode( "previousStep", "two", outNode ); doReturn( inputs ).when( spyAnalyzer ).getInputs(); Set<StepField> usedFields = spyAnalyzer.getUsedFields( meta ); assertEquals( inputs.getFieldNames(), usedFields ); }