@Test public void notifySubscriber_nullSubscriber() { NotifyStatistics statistics = notifyDelegateTestObject.notifySubscriber(null); assertNotNull(statistics); }
@Transactional(propagation = Propagation.REQUIRES_NEW) public NotifyStatistics notifySubscriber(Long subscriberId) { NotifyStatistics statistics = new NotifyStatistics(); if (subscriberId == null) { return statistics; } List<NotificationEvent> events = getEvents(subscriberId); if (events.isEmpty()) { return statistics; } List<NotificationEventTO> eventTOs = converter.toEventTOList(events); if (eventTOs.isEmpty()) { return statistics; } Collections.sort(eventTOs, new NotificationEventTO.NotificationEventTOComparator()); statistics = send(eventTOs.get(0).getEvent().getSubscription().getSubscriber(), eventTOs); updateEvents(eventTOs, statistics); return statistics; }
NotifyDelegate { @Transactional(propagation = Propagation.REQUIRES_NEW) public NotifyStatistics notifySubscriber(Long subscriberId) { NotifyStatistics statistics = new NotifyStatistics(); if (subscriberId == null) { return statistics; } List<NotificationEvent> events = getEvents(subscriberId); if (events.isEmpty()) { return statistics; } List<NotificationEventTO> eventTOs = converter.toEventTOList(events); if (eventTOs.isEmpty()) { return statistics; } Collections.sort(eventTOs, new NotificationEventTO.NotificationEventTOComparator()); statistics = send(eventTOs.get(0).getEvent().getSubscription().getSubscriber(), eventTOs); updateEvents(eventTOs, statistics); return statistics; } }
NotifyDelegate { @Transactional(propagation = Propagation.REQUIRES_NEW) public NotifyStatistics notifySubscriber(Long subscriberId) { NotifyStatistics statistics = new NotifyStatistics(); if (subscriberId == null) { return statistics; } List<NotificationEvent> events = getEvents(subscriberId); if (events.isEmpty()) { return statistics; } List<NotificationEventTO> eventTOs = converter.toEventTOList(events); if (eventTOs.isEmpty()) { return statistics; } Collections.sort(eventTOs, new NotificationEventTO.NotificationEventTOComparator()); statistics = send(eventTOs.get(0).getEvent().getSubscription().getSubscriber(), eventTOs); updateEvents(eventTOs, statistics); return statistics; }  }
NotifyDelegate { @Transactional(propagation = Propagation.REQUIRES_NEW) public NotifyStatistics notifySubscriber(Long subscriberId) { NotifyStatistics statistics = new NotifyStatistics(); if (subscriberId == null) { return statistics; } List<NotificationEvent> events = getEvents(subscriberId); if (events.isEmpty()) { return statistics; } List<NotificationEventTO> eventTOs = converter.toEventTOList(events); if (eventTOs.isEmpty()) { return statistics; } Collections.sort(eventTOs, new NotificationEventTO.NotificationEventTOComparator()); statistics = send(eventTOs.get(0).getEvent().getSubscription().getSubscriber(), eventTOs); updateEvents(eventTOs, statistics); return statistics; }  @Transactional(propagation = Propagation.REQUIRES_NEW) NotifyStatistics notifySubscriber(Long subscriberId); Iterator<Subscriber> getSubscribersIterator(); }
NotifyDelegate { @Transactional(propagation = Propagation.REQUIRES_NEW) public NotifyStatistics notifySubscriber(Long subscriberId) { NotifyStatistics statistics = new NotifyStatistics(); if (subscriberId == null) { return statistics; } List<NotificationEvent> events = getEvents(subscriberId); if (events.isEmpty()) { return statistics; } List<NotificationEventTO> eventTOs = converter.toEventTOList(events); if (eventTOs.isEmpty()) { return statistics; } Collections.sort(eventTOs, new NotificationEventTO.NotificationEventTOComparator()); statistics = send(eventTOs.get(0).getEvent().getSubscription().getSubscriber(), eventTOs); updateEvents(eventTOs, statistics); return statistics; }  @Transactional(propagation = Propagation.REQUIRES_NEW) NotifyStatistics notifySubscriber(Long subscriberId); Iterator<Subscriber> getSubscribersIterator();  }