private void clientInvalidateAfterDestroyLeavesInvalidEntryTest(String uniqueName,
      boolean useReplicateRegion) {
    Host host = Host.getHost(0);
    VM serverVM = host.getVM(0);
    VM clientVM = host.getVM(1);
    final String name = uniqueName + "Region";


    int port = createServerRegion(serverVM, name, useReplicateRegion);

    createClientRegion(clientVM, name, port, true, ClientRegionShortcut.CACHING_PROXY, false);
    final String key = "Object0";

    // use the client cache to create and destroy an entry
    clientVM.invoke(() -> {
      TestRegion.put(key, "some value"); // v1
      TestRegion.destroy(key); // v2
      RegionMap map = TestRegion.getRegionMap();
      AbstractRegionEntry regionEntry = (AbstractRegionEntry) map.getEntry(key);
      assertEquals(Token.TOMBSTONE, regionEntry.getValueAsToken());
    });

    // use the server cache to recreate the entry, but don't let the client cache know about it
    serverVM.invoke(() -> {
      TestRegion.put(key, "new value"); // v3 - not known by client cache
    });

    // now invalidate the entry in the client cache and show that it holds an INVALID entry
    clientVM.invoke(() -> {
      RegionMap map = TestRegion.getRegionMap();
      AbstractRegionEntry regionEntry = (AbstractRegionEntry) map.getEntry(key);

      EntryEventImpl invalidateEvent = new EntryEventImpl();
      invalidateEvent.setRegion(TestRegion);
      invalidateEvent.setKeyInfo(new KeyInfo(key, Token.INVALID, null));
      invalidateEvent.setOperation(Operation.INVALIDATE);
      invalidateEvent.setEventId(new EventID(TestRegion.getCache().getDistributedSystem()));

      // invoke invalidate() with forceNewEntry=true to have it create an INVALID entry
      map.invalidate(invalidateEvent, true, true, false);

      assertEquals(Token.INVALID, regionEntry.getValueAsToken());
      System.out.println("entry=" + regionEntry);
      assertEquals(4, regionEntry.getVersionStamp().getEntryVersion());
    });

    serverVM.invoke(() -> {
      assertTrue(TestRegion.containsKey(key));
      assertNull(TestRegion.get(key));
    });

  }
test that clients receive tombstones in register-interest results
geode-core/src/distributedTest/java/org/apache/geode/cache30/ClientServerCCEDUnitTest.java