DataSourceManager implements Managed { public void remove(DataSource source) { Assert.assertNotNull(source); dataSourceRepository.remove(source); dataRepositoryCache.remove(source.getId()); processorChainManager.removeAll(source); dataViewManager.removeAll(source); notificationManager.removeAll(source); dbConnectorFactory.deleteDatabase(source.getId()); } @Inject  DataSourceManager(
			DataSourceRepository dataSourceRepository,
			Cache<DataRepository> dataRepositoryCache,
			DbConnectorFactory dbConnectorFactory,
			RepositoryFactory repositoryFactory,
			ProcessorChainManager processorChainManager,
			DataViewManager dataViewManager,
			NotificationManager notificationManager); void add(DataSource source); void remove(DataSource source); List<DataSource> getAll(); DataSource findBySourceId(String sourceId); DataRepository getDataRepository(DataSource source); boolean isValidSourceId(String sourceId); @Override void start(); @Override void stop();  }
@Test public void testRemove() { sourceManager.remove(dataSource); new Verifications() {{ dataRepositoryCache.remove(SOURCE_ID); processorChainManager.removeAll(dataSource); dataViewManager.removeAll(dataSource); notificationManager.removeAll(dataSource); dbConnectorFactory.deleteDatabase(SOURCE_ID); }}; }