### Question:
AnnotationDrivenStepMetaAnalyzer extends StepAnalyzer<BaseStepMeta> { @Override protected Set<StepField> getUsedFields( BaseStepMeta meta ) { loadStreamFields( meta ); return new AnnotatedClassFields( meta ).props() .map( AnnotatedClassField::val ) .map( this::stepNameFieldName ) .filter( Optional::isPresent ) .map( Optional::get ) .map( stepField -> new StepField( stepField.left, stepField.right ) ) .collect( toSet() ); } AnnotationDrivenStepMetaAnalyzer( BaseStepMeta meta );  AnnotationDrivenStepMetaAnalyzer( BaseStepMeta meta, VariableSpace space );   AnnotationDrivenStepMetaAnalyzer( BaseStepMeta meta, Map<String, String> typeCategoryMap, EntityRegister register, VariableSpace space ); @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps();  }### Answer:
@Test public void testGetUsedFields() { Set<StepField> usedFields = analyzer.getUsedFields( (BaseStepMeta) meta ); assertThat( usedFields.size(), equalTo( 5 ) ); List<String> usedList = usedFields.stream() .map( StepField::getFieldName ) .sorted() .collect( Collectors.toList() ); List<String> inputSteps = usedFields.stream() .map( StepField::getStepName ) .sorted() .collect( Collectors.toList() ); assertThat( usedList, equalTo( Arrays.asList( "messageField", "substitutedField", "usedField", "usedField1", "usedField2" ) ) ); assertThat( inputSteps, equalTo( Arrays.asList( "Step1", "Step1", "Step1", "Step1", "Step1" ) ) ); }