private EventStore eventStore;
private LevelDBPublishedNotificationTrackerStore publishedNotificationTrackerStore;
public void testTrackMostRecentPublishedNotification() throws Exception {
NotificationLogFactory factory = new NotificationLogFactory(eventStore);
NotificationLog log = factory.createCurrentNotificationLog();
this.publishedNotificationTrackerStore
.trackMostRecentPublishedNotification(
new PublishedNotificationTracker("saasOvation_test"),
log.notifications());
LevelDBUnitOfWork.current().commit();
PublishedNotificationTracker tracker =
this.publishedNotificationTrackerStore
.publishedNotificationTracker();
int notifications = log.notifications().size();
assertNotNull(tracker);
assertEquals(log.notifications().get(notifications - 1).notificationId(),
tracker.mostRecentPublishedNotificationId());
}