@Test
  public void testRemoveAllInClient() {
    client.invoke("testRemoveAllInClient", () -> {
      Region<String, String> region = cache.getRegion(PartitionedRegionName);
      assertThat(region).isNotNull();

      Map<String, String> keysValuesMap = new HashMap<>();
      List<String> testKeysList = new ArrayList<>();
      for (int i = (totalNumBuckets * 3); i > 0; i--) {
        testKeysList.add("putAllKey-" + i);
        keysValuesMap.put("putAllKey-" + i, "values-" + i);
      }

      DistributedSystem.setThreadsSocketPolicy(false);

      region.putAll(keysValuesMap);

      verifyMetadata();

      long metadataRefreshes =
          ((GemFireCacheImpl) cache).getClientMetadataService()
              .getTotalRefreshTaskCount_TEST_ONLY();

      region.removeAll(testKeysList);

      // a new refresh should not have been triggered
      assertThat(((GemFireCacheImpl) cache).getClientMetadataService()
          .getTotalRefreshTaskCount_TEST_ONLY())
              .isEqualTo(metadataRefreshes);

      HashMap<String, Object> noValueMap = new HashMap<>();
      for (String key : testKeysList) {
        noValueMap.put(key, null);
      }

      assertThat(noValueMap).isEqualTo(region.getAll(testKeysList));

      assertThat(((GemFireCacheImpl) cache).getClientMetadataService()
          .getTotalRefreshTaskCount_TEST_ONLY())
              .isEqualTo(metadataRefreshes);
    });
  }
Do a putAll and ensure that metadata has been fetched. Then do a removeAll and
ensure that metadata did not need to be refreshed. Finally do a getAll to ensure
that the removeAll did its job.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java