@Override public void removeUnicastNotificationsByKeyHash(final byte[] keyHash) { validateHash(keyHash, "Can't remove unicast notification. Invalid key hash " + keyHash); unicastNotificationDao.removeNotificationsByKeyHash(keyHash); }
@Test public void testRemoveNotificationsByKeyHash() throws Exception { ByteBuffer epKeyHash = ByteBuffer.wrap(generateBytes()); generateEndpointNotification(epKeyHash, 3); unicastNotificationDao.removeNotificationsByKeyHash(epKeyHash.array()); List<CassandraEndpointNotification> found = unicastNotificationDao.findNotificationsByKeyHash(epKeyHash.array()); Assert.assertTrue(found.isEmpty()); }