### Question:
TextFileOutputStepAnalyzer extends ExternalResourceStepAnalyzer<TextFileOutputMeta> { @Override public Set<String> getOutputResourceFields( TextFileOutputMeta meta ) { Set<String> fields = new HashSet<>(); TextFileField[] outputFields = meta.getOutputFields(); for ( int i = 0; i < outputFields.length; i++ ) { TextFileField outputField = outputFields[ i ]; fields.add( outputField.getName() ); } return fields; }  @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps(); @Override String getResourceInputNodeType(); @Override String getResourceOutputNodeType(); @Override boolean isOutput(); @Override boolean isInput(); @Override IMetaverseNode createResourceNode( IExternalResourceInfo resource ); @Override Set<String> getOutputResourceFields( TextFileOutputMeta meta );  }### Answer:
@Test public void testGetOutputResourceFields() throws Exception { TextFileField[] outputFields = new TextFileField[2]; TextFileField field1 = mock( TextFileField.class ); TextFileField field2 = mock( TextFileField.class ); outputFields[0] = field1; outputFields[1] = field2; when( field1.getName() ).thenReturn( "field1" ); when( field2.getName() ).thenReturn( "field2" ); when( meta.getOutputFields() ).thenReturn( outputFields ); Set<String> outputResourceFields = analyzer.getOutputResourceFields( meta ); assertEquals( outputFields.length, outputResourceFields.size() ); for ( TextFileField outputField : outputFields ) { assertTrue( outputResourceFields.contains( outputField.getName() ) ); } }