### Question:
SplitFieldsStepAnalyzer extends StepAnalyzer<FieldSplitterMeta> { @Override protected Set<StepField> getUsedFields( FieldSplitterMeta meta ) { Set<StepField> usedFields = new HashSet<>(); usedFields.addAll( createStepFields( meta.getSplitField(), getInputs() ) ); return usedFields; }  @Override Set<ComponentDerivationRecord> getChangeRecords( FieldSplitterMeta meta ); @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps();  }### Answer:
@Test public void testGetUsedFields() throws Exception { Set<StepField> fields = new HashSet<>(); fields.add( new StepField( "prev", "splitField" ) ); doReturn( fields ).when( analyzer ).createStepFields( anyString(), any( StepNodes.class ) ); Set<StepField> usedFields = analyzer.getUsedFields( meta ); int expectedUsedFieldCount = 1; assertEquals( expectedUsedFieldCount, usedFields.size() ); verify( analyzer, times( expectedUsedFieldCount ) ).createStepFields( anyString(), any( StepNodes.class ) ); }