### Question:
StringsReplaceStepAnalyzer extends StepAnalyzer<ReplaceStringMeta> { @Override protected Set<StepField> getUsedFields( ReplaceStringMeta meta ) { HashSet<StepField> usedFields = new HashSet<>(); for ( String fieldInString : meta.getFieldInStream() ) { usedFields.addAll( createStepFields( fieldInString, getInputs() ) ); } for ( String replaceByField : meta.getFieldReplaceByString() ) { if ( !Const.isEmpty( replaceByField ) ) { usedFields.addAll( createStepFields( replaceByField, getInputs() ) ); } } return usedFields; }  @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps(); @Override Set<ComponentDerivationRecord> getChangeRecords( final ReplaceStringMeta stringsReplaceMeta );  }### Answer:
@Test public void testGetUsedFields() { Set<StepField> usedFields = analyzer.getUsedFields( stringsReplaceMeta ); List<String> inFields = Arrays.asList( stringsReplaceMeta.getFieldInStream() ); for ( StepField usedField : usedFields ) { assertTrue( inFields.contains( usedField.getFieldName() ) ); } }