@Test
  public void test030InterestListRegistrationWithCallbackArg() throws CacheException {
    final String name = getName();

    // Create cache server
    vm0.invoke("Create Cache Server", () -> {
      CacheLoader<Object, Object> cl = new CacheLoader<Object, Object>() {
        @Override
        public Object load(LoaderHelper helper) {
          return helper.getKey();
        }

        @Override
        public void close() {

        }
      };
      RegionFactory<Object, Object> factory = getBridgeServerRegionAttributes(cl, null);
      createRegion(name, factory);
      startBridgeServer(0);
    });

    // Create cache server clients
    final int port = vm0.invoke(ConnectionPoolDUnitTest::getCacheServerPort);
    final String host0 = NetworkUtils.getServerHostName();

    Stream.of(vm1, vm2).forEach(vm -> vm.invoke("Create region", () -> {
      getLonerSystem();
      RegionFactory<Object, Object> factory = getCache().createRegionFactory();
      factory.setScope(Scope.LOCAL);
      factory.setConcurrencyChecksEnabled(false);
      // create bridge writer
      configureConnectionPool(factory, host0, new int[] {port}, true, -1, -1, null);
      factory.addCacheListener(new ControlListener());
      createRegion(name, factory);
    }));

    // VM1 Register interest
    vm1.invoke("Create Entries and Register Interest", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);

      // This call will cause no value to be put into the region
      region.registerInterest("key-1", InterestResultPolicy.NONE);

    });

    // VM2 Put entry (this will cause a create event in both VM1 and VM2)
    vm2.invoke("Put Value", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      region.create("key-1", "key-1-create", "key-1-create");
    });

    // VM2 Put entry (this will cause an update event in both VM1 and VM2)
    vm2.invoke("Put Value", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      region.put("key-1", "key-1-update", "key-1-update");
    });

    // VM2 Destroy entry (this will cause a destroy event)
    vm2.invoke("Destroy Entry", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      region.destroy("key-1", "key-1-destroy");
    });

    vm1.invoke("Verify events", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      ControlListener listener = (ControlListener) region.getAttributes().getCacheListeners()[0];
      int eventCount = 3;
      listener.waitWhileNotEnoughEvents(eventCount);
      assertThat(eventCount).isEqualTo(listener.events.size());

      {
        EventWrapper ew = listener.events.get(0);
        assertThat(ew.type).isEqualTo(TYPE_CREATE);
        Object key = "key-1";
        assertThat(key).isEqualTo(ew.event.getKey());
        assertThat(ew.event.getOldValue()).isNull();
        assertThat("key-1-create").isEqualTo(ew.event.getNewValue());
        assertThat(Operation.CREATE).isEqualTo(ew.event.getOperation());
        assertThat("key-1-create").isEqualTo(ew.event.getCallbackArgument());
        assertThat(ew.event.isOriginRemote()).isTrue();

        ew = listener.events.get(1);
        assertThat(ew.type).isEqualTo(TYPE_UPDATE);
        assertThat(key).isEqualTo(ew.event.getKey());
        assertThat("key-1-create").isEqualTo(ew.event.getOldValue());
        assertThat("key-1-update").isEqualTo(ew.event.getNewValue());
        assertThat(Operation.UPDATE).isEqualTo(ew.event.getOperation());
        assertThat("key-1-update").isEqualTo(ew.event.getCallbackArgument());
        assertThat(ew.event.isOriginRemote()).isTrue();

        ew = listener.events.get(2);
        assertThat(ew.type).isEqualTo(TYPE_DESTROY);
        assertThat("key-1-destroy").isEqualTo(ew.arg);
        assertThat(key).isEqualTo(ew.event.getKey());
        assertThat("key-1-update").isEqualTo(ew.event.getOldValue());
        assertThat(ew.event.getNewValue()).isNull();
        assertThat(Operation.DESTROY).isEqualTo(ew.event.getOperation());
        assertThat("key-1-destroy").isEqualTo(ew.event.getCallbackArgument());
        assertThat(ew.event.isOriginRemote()).isTrue();
      }
    });

    // Close cache server clients
    Stream.of(vm1, vm2).forEach(vm -> vm.invoke("Close Pool", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      region.localDestroyRegion();
    }));
  }
Tests interest list registration with callback arg
geode-core/src/distributedTest/java/org/apache/geode/cache/ConnectionPoolDUnitTest.java