public static void checkAsyncQueueMBean(final VM vm, final boolean shouldExist) {
    SerializableRunnable checkAsyncQueueMBean =
        new SerializableRunnable("Check Async Queue MBean") {
          @Override
          public void run() {
            ManagementService service = ManagementService.getManagementService(cache);
            AsyncEventQueueMXBean bean = service.getLocalAsyncEventQueueMXBean("pn");
            if (shouldExist) {
              assertThat(bean).isNotNull();
            } else {
              assertThat(bean).isNull();
            }
          }
        };
    vm.invoke(checkAsyncQueueMBean);
  }
Checks whether a Async Queue MBean is created or not

@param vm reference to VM
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/WANTestBase.java