### Question:
ExternalResourceStepAnalyzer extends StepAnalyzer<T> { @Override protected IMetaverseNode createInputFieldNode( IAnalysisContext context, ValueMetaInterface fieldMeta, String previousStepName, String nodeType ) { boolean isResource = RESOURCE.equals( previousStepName ); nodeType = isResource ? getResourceInputNodeType() : nodeType; IMetaverseNode inputFieldNode = super.createInputFieldNode( context, fieldMeta, previousStepName, nodeType ); inputFieldNode.setType( nodeType ); if ( isResource ) { getMetaverseBuilder().addNode( inputFieldNode ); } return inputFieldNode; }  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 testCreateInputFieldNode_resource() throws Exception { IAnalysisContext context = mock( IAnalysisContext.class ); doReturn( "thisStepName" ).when( analyzer ).getStepName(); analyzer.rootNode = node; when( node.getLogicalId() ).thenReturn( "logical id" ); ValueMetaInterface vmi = new ValueMeta( "name", 1 ); IMetaverseNode inputFieldNode = analyzer.createInputFieldNode( context, vmi, ExternalResourceStepAnalyzer.RESOURCE, DictionaryConst.NODE_TYPE_TRANS_FIELD ); assertNotNull( inputFieldNode ); assertNotNull( inputFieldNode.getProperty( DictionaryConst.PROPERTY_KETTLE_TYPE ) ); assertEquals( "thisStepName", inputFieldNode.getProperty( DictionaryConst.PROPERTY_TARGET_STEP ) ); assertEquals( "INPUT_TYPE", inputFieldNode.getType() ); verify( builder ).addNode( inputFieldNode ); }