DistributedEventTracker implements EventTracker { @Override public Map<ThreadIdentifier, EventSequenceNumberHolder> getState() { Map<ThreadIdentifier, EventSequenceNumberHolder> result = new HashMap<>(recordedEvents.size()); for (Map.Entry<ThreadIdentifier, EventSequenceNumberHolder> entry : recordedEvents.entrySet()) { EventSequenceNumberHolder holder = entry.getValue(); result.put(entry.getKey(), new EventSequenceNumberHolder(holder.getLastSequenceNumber(), null)); } return result; } DistributedEventTracker(InternalCache cache, CancelCriterion stopper, String regionName); @Override void start(); @Override void stop(); @Override void clear(); @Override Map<ThreadIdentifier, EventSequenceNumberHolder> getState(); @Override void recordState(InternalDistributedMember provider,
      Map<ThreadIdentifier, EventSequenceNumberHolder> state); @Override void setInitialized(); @Override void waitOnInitialization(); @Override void recordEvent(InternalCacheEvent event); @Override boolean hasSeenEvent(InternalCacheEvent event); @Override boolean hasSeenEvent(EventID eventID); @Override boolean hasSeenEvent(EventID eventID, InternalCacheEvent tagHolder); @Override VersionTag findVersionTagForSequence(EventID eventID); @Override VersionTag findVersionTagForBulkOp(EventID eventID); @Override String getName(); @Override void syncBulkOp(Runnable r, EventID eventID, boolean partOfTransaction); @Override void recordBulkOpStart(EventID eventID, ThreadIdentifier tid); @Override boolean isInitialized(); @Override boolean isInitialImageProvider(DistributedMember mbr); @Override ConcurrentMap<ThreadIdentifier, BulkOperationHolder> getRecordedBulkOpVersionTags(); @Override ConcurrentMap<ThreadIdentifier, EventSequenceNumberHolder> getRecordedEvents(); @Override String toString();  }
@Test public void returnsEmptyMapIfRecordedEventsAreEmpty() { assertEquals(0, eventTracker.getState().size()); }