@Test public void testRemoveUnicastNotificationsByKeyHash() { TopicDto topicDto = generateTopicDto(null, null); EndpointProfileDto profile = generateEndpointProfileDto(topicDto.getApplicationId(), Arrays.asList(topicDto.getId())); byte[] keyHash = profile.getEndpointKeyHash(); EndpointNotificationDto notification = generateUnicastNotificationDto(null, topicDto.getId(), keyHash); Assert.assertTrue(isNotBlank(notification.getId())); notificationService.removeUnicastNotificationsByKeyHash(keyHash); List<EndpointNotificationDto> notifications = notificationService.findUnicastNotificationsByKeyHash(keyHash); Assert.assertTrue(notifications.isEmpty()); }