### Question:
MongoDbInputStepAnalyzer extends ConnectionExternalResourceStepAnalyzer<MongoDbInputMeta> { @Override protected IMetaverseNode createTableNode( IExternalResourceInfo resource ) throws MetaverseAnalyzerException { MongoDbResourceInfo resourceInfo = (MongoDbResourceInfo) resource; MetaverseComponentDescriptor componentDescriptor = new MetaverseComponentDescriptor( resourceInfo.getCollection(), DictionaryConst.NODE_TYPE_MONGODB_COLLECTION, getConnectionNode(), getDescriptor().getContext() ); IMetaverseNode node = createNodeFromDescriptor( componentDescriptor ); node.setProperty( DictionaryConst.PROPERTY_NAMESPACE, componentDescriptor.getNamespace().getNamespaceId() ); node.setProperty( COLLECTION, resourceInfo.getCollection() ); node.setLogicalIdGenerator( DictionaryConst.LOGICAL_ID_GENERATOR_DEFAULT ); return node; }  @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps(); @Override String getResourceInputNodeType(); @Override String getResourceOutputNodeType(); @Override boolean isOutput(); @Override boolean isInput(); @Override String toString(); static final String COLLECTION; static final String AGG_PIPELINE; static final String FIELDS_EXPRESSION; static final String READ_PREF; static final String TAG_SETS; static final String OUTPUT_JSON; static final String JSON_PATH; static final String MINMAX_RANGE; static final String OCCUR_RATIO; static final String INDEXED_VALS; static final String DISPARATE_TYPES; }### Answer:
@Test public void testCreateTableNode() throws Exception { IConnectionAnalyzer connectionAnalyzer = mock( IConnectionAnalyzer.class ); doReturn( connectionAnalyzer ).when( analyzer ).getConnectionAnalyzer(); IMetaverseNode connNode = mock( IMetaverseNode.class ); when( connectionAnalyzer.analyze( any( IComponentDescriptor.class ), anyObject() ) ).thenReturn( connNode ); MongoDbResourceInfo resourceInfo = mock( MongoDbResourceInfo.class ); when( resourceInfo.getCollection() ).thenReturn( "myCollection" ); IMetaverseNode connectionNode = mock( IMetaverseNode.class ); doReturn( connectionNode ).when( analyzer ).getConnectionNode(); when( connectionNode.getLogicalId() ).thenReturn( "CONNECTION_ID" ); IMetaverseNode resourceNode = analyzer.createTableNode( resourceInfo ); assertEquals( "myCollection", resourceNode.getProperty( MongoDbInputStepAnalyzer.COLLECTION ) ); assertEquals( "myCollection", resourceNode.getName() ); assertEquals( "CONNECTION_ID", resourceNode.getProperty( DictionaryConst.PROPERTY_NAMESPACE ) ); }