### Question:
DataSourceRepositoryManager implements DataSourceInformationRepositoryListener { public void addDataSourceInformation(DataSourceInformation dataSourceInformation) { assertDataSourceInformationNull(dataSourceInformation); String repositoryType = dataSourceInformation.getRepositoryType(); if (log.isDebugEnabled()) { log.debug("Registering a datasource in the repository : " + repositoryType + "." + " DataSource information is : " + dataSourceInformation); } if (DataSourceConstants.PROP_REGISTRY_JNDI.equals(repositoryType)) { jndiBasedDataSourceRepository.register(dataSourceInformation); } else { inMemoryDataSourceRepository.register(dataSourceInformation); } } DataSourceRepositoryManager(InMemoryDataSourceRepository inMemoryDataSourceRepository,
                                       JNDIBasedDataSourceRepository jndiBasedDataSourceRepository); DataSource getDataSource(String name); void addDataSourceInformation(DataSourceInformation dataSourceInformation); void removeDataSourceInformation(DataSourceInformation dataSourceInformation); void reConfigure(Properties confProperties); void clear();  }### Answer:
@Test public void testAddDataSourceInformationNull() { thrown.expect(SynapseCommonsException.class); thrown.expectMessage("Provided DataSource Information instance is null"); repositoryManager.addDataSourceInformation(null); }