@Override public void removeNotificationSchemasByAppId(String appId) { validateId(appId, "Can't remove notification schemas. Invalid application id: " + appId); LOG.debug("Cascade remove corresponding notification to application id [{}]", appId); unicastNotificationDao.removeNotificationsByAppId(appId); notificationSchemaDao.removeNotificationSchemasByAppId(appId); }
@Test public void testRemoveNotificationsByAppId() throws Exception { CassandraEndpointNotification notification = generateEndpointNotification(null, 3).get(0); String appId = notification.getApplicationId(); unicastNotificationDao.removeNotificationsByAppId(appId); List<CassandraEndpointNotification> found = unicastNotificationDao.findNotificationsByKeyHash(notification.getEndpointKeyHash().array()); Assert.assertTrue(found.isEmpty()); }