@Test public void testRemoveByIdNullKey() throws Exception { List<CassandraEndpointConfiguration> configs = generateConfiguration(3); CassandraEndpointConfiguration expected = configs.get(0); endpointConfigurationDao.removeById(null); CassandraEndpointConfiguration found = endpointConfigurationDao.findByHash(expected.getConfigurationHash().array()); Assert.assertEquals(expected, found); }
@Test public void testRemoveById() throws Exception { List<CassandraEndpointConfiguration> configs = generateConfiguration(3); CassandraEndpointConfiguration expected = configs.get(0); endpointConfigurationDao.removeById(expected.getConfigurationHash()); CassandraEndpointConfiguration found = endpointConfigurationDao.findByHash(expected.getConfigurationHash().array()); Assert.assertNull(found); } }
@Test public void removeEndpointConfigurationByIdTest() { EndpointConfigurationDto endpointConfiguration = generateEndpointConfiguration(); Assert.assertNotNull(endpointConfiguration); endpointConfigurationDao.removeById(ByteBuffer.wrap(endpointConfiguration.getConfigurationHash())); MongoEndpointConfiguration found = endpointConfigurationDao.findById(ByteBuffer.wrap(endpointConfiguration.getConfigurationHash())); Assert.assertNull(found); }