private void createConcurrentAsyncEventQueue(String asyncEventQueueId,
      AsyncEventListener asyncEventListener,
      boolean isBatchConflationEnabled,
      int batchSize,
      int dispatcherThreads,
      int maximumQueueMemory,
      OrderPolicy orderPolicy,
      boolean isParallel) {
    assertThat(asyncEventQueueId).isNotEmpty();
    assertThat(asyncEventListener).isNotNull();

    AsyncEventQueueFactory asyncEventQueueFactory = getCache().createAsyncEventQueueFactory();
    asyncEventQueueFactory.setBatchConflationEnabled(isBatchConflationEnabled);
    asyncEventQueueFactory.setBatchSize(batchSize);
    asyncEventQueueFactory.setDispatcherThreads(dispatcherThreads);
    asyncEventQueueFactory.setOrderPolicy(orderPolicy);
    asyncEventQueueFactory.setMaximumQueueMemory(maximumQueueMemory);
    asyncEventQueueFactory.setParallel(isParallel);

    asyncEventQueueFactory.create(asyncEventQueueId, asyncEventListener);
  }
Regression test for TRAC #50366: NullPointerException with AsyncEventQueue#size() when number
of dispatchers is more than 1
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/wan/asyncqueue/ConcurrentAsyncEventListenerDistributedTest.java