public static void validateEventsAtReceivingClientListener(String key) {
    EventID eventIdAtClient2 = (EventID) assertThreadIdToSequenceIdMapHasEntryId();
    if ((eventIdAtClient2.getThreadID() == eventIdForLastKey.getThreadID())
        && (eventIdAtClient2.getSequenceID() == eventIdForLastKey.getSequenceID())) {
      LogWriterUtils.getLogWriter().info("Notifying client2 to proceed for validation");
      proceedForValidation = true;
    } else {
      boolean containsEventId = false;
      for (final EventID eventId : eventIds) {
        if ((eventIdAtClient2.getThreadID() == eventId.getThreadID())
            && (eventIdAtClient2.getSequenceID() == eventId.getSequenceID())) {
          containsEventId = true;
          break;
        }
      }
      if (!containsEventId) {
        validationFailed = true;
        failureMsg.append("key = ").append(key).append(" ; eventID = ").append(eventIdAtClient2)
            .append(lineSeparator());
      }
    }
  }
Validates that the eventId of the event received in callback is contained in the eventId array
originally used by client1 to generate the events and notifies client2 to proceed for
validation once the LAST_KEY is received

@param key - the key of the event for EntryEvent / token indicating type of region operation
       for RegionEvent
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ha/EventIdOptimizationDUnitTest.java