### Question:
DataSourceRepositoryHolder { public void init(DataSourceInformationRepository repository, Properties properties) { if (initialized) { if (log.isDebugEnabled()) { log.debug("Data source repository holder has already been initialized."); } return; } if (log.isDebugEnabled()) { log.debug("Initializing the data source repository holder"); } DataSourceInformationRepositoryListener repositoryListener = null; if (repository != null) { repositoryListener = repository.getRepositoryListener(); } if (repositoryListener == null) { repositoryListener = new DataSourceRepositoryManager( new InMemoryDataSourceRepository(), new JNDIBasedDataSourceRepository()); if (repository != null) { repository.setRepositoryListener(repositoryListener); } } if (repositoryListener instanceof DataSourceRepositoryManager) { dataSourceRepositoryManager = (DataSourceRepositoryManager) repositoryListener; repositoryBasedDataSourceFinder = new RepositoryBasedDataSourceFinder(); repositoryBasedDataSourceFinder.init(dataSourceRepositoryManager); } if (repository == null) { repository = DataSourceInformationRepositoryFactory.createDataSourceInformationRepository( repositoryListener, properties); } else { DataSourceInformationRepositoryFactory.setupDataSourceInformationRepository( repository, properties); } dataSourceInformationRepository = repository; initialized = true; } private  DataSourceRepositoryHolder(); static DataSourceRepositoryHolder getInstance(); void init(DataSourceInformationRepository repository, Properties properties); DataSourceInformationRepository getDataSourceInformationRepository(); boolean isInitialized(); DataSourceRepositoryManager getDataSourceRepositoryManager(); RepositoryBasedDataSourceFinder getRepositoryBasedDataSourceFinder();  }### Answer:
@Test public void testInit() { Assert.assertNotNull("new listener should be initialized by init method", informationRepository.getRepositoryListener()); }