private void validateAsyncEventForOperationDetail(int expectedSize, OperationType operationType) {
    Map<?, AsyncEvent> eventsMap = (Map<?, AsyncEvent>) getSpyAsyncEventListener().getEventsMap();

    await()
        .untilAsserted(() -> assertThat(eventsMap.size()).isEqualTo(expectedSize));

    for (AsyncEvent<?, ?> asyncEvent : eventsMap.values()) {
      switch (operationType) {
        case LOAD:
          assertThat(asyncEvent.getOperation().isLoad()).isTrue();
          break;
        case PUT_ALL:
          assertThat(asyncEvent.getOperation().isPutAll()).isTrue();
          break;
        default:
          fail("Invalid OperationType: " + operationType);
      }
    }
  }
Verify that the events reaching the AsyncEventListener have correct operation detail.

<p>
Regression test for TRAC #50237: AsyncEventListeners does not report correct operation detail
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerWithCacheLoaderDistributedTest.java