### Question:
ExternalResourceStepAnalyzer extends StepAnalyzer<T> { protected Set<String> getInputFieldsToIgnore( final T meta, final Map<String, RowMetaInterface> inputRows, final RowMetaInterface rowMeta ) { Set<String> inputFieldsToIgnore = new HashSet<>(); for ( RowMetaInterface rowMetaInterface : inputRows.values() ) { for ( ValueMetaInterface inputField : rowMetaInterface.getValueMetaList() ) { inputFieldsToIgnore.add( inputField.getName() ); } } if ( meta instanceof BaseFileInputMeta ) { final BaseFileInputMeta fileMeta = (BaseFileInputMeta) meta; final BaseFileField[] inputFields = fileMeta.getInputFields(); final List<String> inputFieldNames = new ArrayList<>(); for ( final BaseFileField inputField : inputFields ) { inputFieldNames.add( inputField.getName() ); } final List<ValueMetaInterface> rowMetaValueMetaList = rowMeta.getValueMetaList(); for ( final ValueMetaInterface rowMetaValueMeta : rowMetaValueMetaList ) { if ( !inputFieldNames.contains( rowMetaValueMeta.getName() ) ) { inputFieldsToIgnore.add( rowMetaValueMeta.getName() ); } } } return inputFieldsToIgnore; }  boolean hasOutputResource( T meta ); IStepExternalResourceConsumer getExternalResourceConsumer(); void setExternalResourceConsumer( IStepExternalResourceConsumer externalResourceConsumer ); Set<String> getOutputResourceFields( T meta ); abstract IMetaverseNode createResourceNode( IExternalResourceInfo resource ); IMetaverseNode createResourceNode( T meta, IExternalResourceInfo resource ); abstract String getResourceInputNodeType(); abstract String getResourceOutputNodeType(); abstract boolean isOutput(); abstract boolean isInput(); @Override boolean copyState( final IClonableStepAnalyzer newAnalyzer ); static final String RESOURCE; }### Answer:
@Test public void testGetInputFieldsToIgnore() { doReturn( true ).when( analyzer ).isInput(); RowMetaInterface inputFieldRowMeta = mock( RowMetaInterface.class ); List<ValueMetaInterface> inputFields = new ArrayList<>(); inputFields.add( new ValueMeta( "in_field_1" ) ); Map<String, RowMetaInterface> inputFieldRowMetaMap = new HashMap<>(); inputFieldRowMetaMap.put( ExternalResourceStepAnalyzer.RESOURCE, inputFieldRowMeta ); when( inputFieldRowMeta.getValueMetaList() ).thenReturn( inputFields ); List<ValueMetaInterface> outputFields = new ArrayList<>(); outputFields.addAll( inputFields ); outputFields.add( new ValueMeta( "file_field_1" ) ); outputFields.add( new ValueMeta( "additional_field" ) ); outputFields.add( new ValueMeta( "file_field_2" ) ); RowMetaInterface outputFieldsRowMeta = mock( RowMetaInterface.class ); when( outputFieldsRowMeta.getValueMetaList() ).thenReturn( outputFields ); final BaseFileField[] resourceFields = new BaseFileField[ 2 ]; resourceFields[ 0 ] = new BaseFileField( "file_field_1", 0, 0 ); resourceFields[ 1 ] = new BaseFileField( "file_field_2", 0, 0 ); doReturn( resourceFields ).when( fileMeta ).getInputFields(); Set<String> fieldsToIgnore = analyzer.getInputFieldsToIgnore( fileMeta, inputFieldRowMetaMap, outputFieldsRowMeta ); assertEquals( 2, fieldsToIgnore.size() ); assertTrue( fieldsToIgnore.contains( "in_field_1" ) ); assertTrue( fieldsToIgnore.contains( "additional_field" ) ); }