@Test public void testRemoveByHash() throws Exception { List<CassandraEndpointConfiguration> configs = generateConfiguration(3); CassandraEndpointConfiguration expected = configs.get(0); endpointConfigurationDao.removeByHash(expected.getConfigurationHash().array()); CassandraEndpointConfiguration found = endpointConfigurationDao.findByHash(expected.getConfigurationHash().array()); Assert.assertNull(found); }
@Test public void removeEndpointConfigurationByHashTest() { EndpointConfigurationDto endpointConfiguration = generateEndpointConfiguration(); Assert.assertNotNull(endpointConfiguration); byte[] bytes = endpointConfiguration.getConfigurationHash(); endpointConfigurationDao.removeByHash(bytes); MongoEndpointConfiguration configurationDto = endpointConfigurationDao.findByHash(bytes); Assert.assertNull(configurationDto); }