@Test
  public void shouldReturnVersionTagOfTombstoneVersionWhenRemoveAllRetried() {
    // set notifyBySubscription=false to test local-invalidates
    int serverPort1 = server1.invoke(() -> new ServerBuilder()
        .regionShortcut(PARTITION_PERSISTENT)
        .create());

    client1.invoke(() -> new ClientBuilder()
        .serverPorts(serverPort1)
        .create());

    client1.invoke(() -> {
      Region<String, TickerData> region = getClientCache().getRegion(regionName);
      doPutAll(region, "key-", ONE_HUNDRED);
      assertThat(region.size()).isEqualTo(ONE_HUNDRED);
    });

    // verify cache server 1, its data is from client
    server1.invoke(() -> {
      assertThat(getCache().getRegion(regionName).size()).isEqualTo(ONE_HUNDRED);
    });

    VersionedObjectList versions = client1.invoke(() -> {
      Region<String, TickerData> region = getClientCache().getRegion(regionName);
      VersionedObjectList versionsToReturn = doRemoveAll(region, "key-", ONE_HUNDRED);
      assertThat(region.size()).isZero();
      return versionsToReturn;
    });

    // client1 removeAll again
    VersionedObjectList versionsAfterRetry = client1.invoke(() -> {
      Region<String, TickerData> region = getClientCache().getRegion(regionName);
      VersionedObjectList versionsToReturn = doRemoveAll(region, "key-", ONE_HUNDRED);
      assertThat(region.size()).isZero();
      return versionsToReturn;
    });

    // noinspection rawtypes
    List<VersionTag> versionTags = versions.getVersionTags();
    // noinspection rawtypes
    List<VersionTag> versionTagsAfterRetry = versionsAfterRetry.getVersionTags();
    assertThat(versionTags)
        .hasSameSizeAs(versionTagsAfterRetry)
        .containsAll(versionTagsAfterRetry);
  }
Create PR without redundancy on 2 servers with lucene index. Feed some key s. From a client, do
removeAll on keys in server1. During the removeAll, restart server1 and trigger the removeAll
to retry. The retried removeAll should return the version tag of tombstones. Do removeAll again
on the same key, it should get the version tag again.
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/PutAllClientServerDistributedTest.java