### Question:
FilterRowsStepAnalyzer extends StepAnalyzer<FilterRowsMeta> { @Override protected Set<StepField> getUsedFields( FilterRowsMeta meta ) { Set<StepField> usedFields = new HashSet<>(); final Condition condition = meta.getCondition(); if ( condition != null ) { for ( String usedField : condition.getUsedFields() ) { usedFields.addAll( createStepFields( usedField, getInputs() ) ); } } return usedFields; }  @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps(); @Override IClonableStepAnalyzer newInstance(); static final String DATA_FLOW_CONDITION; }### Answer:
@Test public void testGetUsedFields() throws Exception { StepNodes inputNodes = new StepNodes(); inputNodes.addNode( "input", "height", node ); inputNodes.addNode( "input", "width", node ); inputNodes.addNode( "input", "radius", node ); inputNodes.addNode( "input", "pi", node ); inputNodes.addNode( "input", "two", node ); when( analyzer.getInputs() ).thenReturn( inputNodes ); Set<StepField> usedFields = analyzer.getUsedFields( meta ); assertNotNull( usedFields ); assertEquals( conditionFields.length, usedFields.size() ); }
@Test public void testGetUsedFields_nullCondition() throws Exception { when( meta.getCondition() ).thenReturn( null ); Set<StepField> usedFields = analyzer.getUsedFields( meta ); assertNotNull( usedFields ); assertEquals( 0, usedFields.size() ); }