### Question:
DatabaseConnectionAnalyzer extends BaseKettleMetaverseComponent implements IDatabaseConnectionAnalyzer<T> { @Override public IComponentDescriptor buildComponentDescriptor( IComponentDescriptor parentDescriptor, DatabaseMeta connection ) { IComponentDescriptor dbDescriptor = new MetaverseComponentDescriptor( connection.getName(), DictionaryConst.NODE_TYPE_DATASOURCE, parentDescriptor .getNamespace(), parentDescriptor.getContext() ); return dbDescriptor; }  @Override IMetaverseNode analyze( IComponentDescriptor descriptor, DatabaseMeta dbMeta ); @Override IComponentDescriptor buildComponentDescriptor( IComponentDescriptor parentDescriptor,
                                                        DatabaseMeta connection );  }### Answer:
@Test public void testBuildComponentDescriptor() throws Exception { when( databaseMeta.getName() ).thenReturn( "connectionName" ); when( mockDescriptor.getNamespace() ).thenReturn( mock( INamespace.class) ); when( mockDescriptor.getContext() ).thenReturn( mock( IAnalysisContext.class ) ); IComponentDescriptor dbDesc = dbConnectionAnalyzer.buildComponentDescriptor( mockDescriptor, databaseMeta ); assertNotNull( dbDesc ); assertEquals( "connectionName", dbDesc.getName() ); }