@Test
  public void testPutAllInClient() {
    client.invoke("testPutAllInClient", () -> {
      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.putAll(keysValuesMap);

      // a new refresh should not have been triggered
      assertThat(((GemFireCacheImpl) cache).getClientMetadataService()
          .getTotalRefreshTaskCount_TEST_ONLY())
              .isEqualTo(metadataRefreshes);
    });
  }
perform a putAll and ensure that metadata is fetched. Then do another
putAll and ensure that metadata did not need to be refreshed
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/SingleHopGetAllPutAllDUnitTest.java