public static List<EntryEvent<?, ?>> getEntryEventsWithOperation(
      List<CacheEvent<?, ?>> cacheEvents,
      Predicate<Operation> operationPredicate) {
    return getEntryEventsMatching(cacheEvents, e -> operationPredicate.test(e.getOperation()));
  }
Selects the entry events whose operation matches the given predicate.

@param cacheEvents the cache events from which to select entry events
@param operationPredicate tests each event's operation to determine whether to include the
       event
@return list of entry events whose operations match the given predicate
@throws ClassCastException if the predicate matches the operation of an event that is not an
        {@code EntryEvent}
geode-junit/src/main/java/org/apache/geode/cache/util/TxEventTestUtil.java