### Question:
ExternalResourceStepAnalyzer extends StepAnalyzer<T> { @Override protected Map<String, RowMetaInterface> getOutputRowMetaInterfaces( T meta ) { Map<String, RowMetaInterface> outputRows = super.getOutputRowMetaInterfaces( meta ); if ( hasOutputResource( meta ) && MapUtils.isNotEmpty( outputRows ) ) { if ( isOutput() ) { RowMetaInterface out = null; Set<String> outputResourceFields = getOutputResourceFields( meta ); for ( RowMetaInterface rowMetaInterface : outputRows.values() ) { if ( outputResourceFields != null ) { out = rowMetaInterface.clone(); for ( ValueMetaInterface field : rowMetaInterface.getValueMetaList() ) { if ( !outputResourceFields.contains( field.getName() ) ) { try { out.removeValueMeta( field.getName() ); } catch ( KettleValueException e ) { } } } } else { out = rowMetaInterface; } break; } outputRows.put( RESOURCE, out ); } } return outputRows; }  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 testGetOutputRowMetaInterfaces() throws Exception { String[] nextStepNames = new String[] { "nextStep1" }; when( parentTransMeta.getNextStepNames( parentStepMeta ) ).thenReturn( nextStepNames ); RowMetaInterface rowMetaInterface = mock( RowMetaInterface.class ); doReturn( rowMetaInterface ).when( analyzer ).getOutputFields( meta ); Map<String, RowMetaInterface> rowMetaInterfaces = analyzer.getOutputRowMetaInterfaces( meta ); assertNotNull( rowMetaInterfaces ); assertEquals( nextStepNames.length, rowMetaInterfaces.size() ); assertEquals( rowMetaInterface, rowMetaInterfaces.get( nextStepNames[ 0 ] ) ); }