### Question:
DataSourceInformationRepository { public DataSourceInformation removeDataSourceInformation(String name) { if (name == null || "".equals(name)) { throw new SynapseCommonsException("Name of the datasource information instance to be" + " removed is null", log); } DataSourceInformation information = dataSourceInformationMap.remove(name); if (information == null) { throw new SynapseCommonsException("There is no datasource information instance" + " for given name :" + name, log); } if (assertListerNotNull()) { listener.removeDataSourceInformation(information); } return information; }  void configure(Properties configurationProperties); void addDataSourceInformation(DataSourceInformation dataSourceInformation); DataSourceInformation getDataSourceInformation(String name); DataSourceInformation removeDataSourceInformation(String name); Iterator<DataSourceInformation> getAllDataSourceInformation(); void setRepositoryListener(DataSourceInformationRepositoryListener listener); void removeRepositoryListener(); DataSourceInformationRepositoryListener getRepositoryListener();  }### Answer:
@Test public void testRemoveDataSourceInformationNull() { thrown.expectMessage("Name of the datasource information instance to be removed is null"); thrown.expect(SynapseCommonsException.class); repository.removeDataSourceInformation(null); }
@Test public void testRemoveDataSourceInformationNotExist() { thrown.expect(SynapseCommonsException.class); thrown.expectMessage("There is no datasource information instance for given name :" + ERR_DATASOURCE); repository.removeDataSourceInformation(ERR_DATASOURCE); }