class SubscriptionService {

    public Subscription searchSubscription(Subscription subscription, String alarmId) {
        LOGGER.debug("Searched identical subscription to: {}", subscription);

        Alarm alarm = seyrenRepository.getAlarm(alarmId);

        return alarm.getSubscriptions().stream().filter(s -> s.equals(subscription)).findAny().orElse(null);
    }

}