@Test
  public void testProxyRegionStats() throws CacheException {
    String name = getUniqueName();
    Object key = 0;
    Object missingKey = 999;
    Object value = "VALUE";

    // Create the PARTITION_PROXY region
    AttributesFactory proxyRegionAttrsFactory = new AttributesFactory();
    proxyRegionAttrsFactory.setStatisticsEnabled(true);
    PartitionAttributesFactory paf = new PartitionAttributesFactory();
    // Setting LocalMaxMemory to 0 makes the region of PROXY type
    paf.setLocalMaxMemory(0);
    proxyRegionAttrsFactory.setPartitionAttributes(paf.create());
    Region region = createPartitionedRegion(name, proxyRegionAttrsFactory.create());

    // Create the region as not proxy on another server to be able to add entries.
    VM vm0 = VM.getVM(0);
    vm0.invoke(() -> {
      AttributesFactory factory = new AttributesFactory();
      factory.setStatisticsEnabled(true);
      createPartitionedRegion(name, factory.create());
    });

    region.put(key, value);
    region.get(key);
    region.get(missingKey);

    CacheStatistics stats = region.getStatistics();
    assertEquals(0, stats.getLastModifiedTime());
    assertEquals(0, stats.getLastAccessedTime());
    assertEquals(0, stats.getHitCount());
    assertEquals(0, stats.getMissCount());
    assertEquals(0.0f, stats.getHitRatio(), 0.0f);

    // Call reset counts to check that no exception is raised
    stats.resetCounts();
  }
Tests that the stats values for a Proxy PartitionedRegion are all 0.
geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheStatisticsPartitionedRegionDUnitTest.java