@Test
  public void whenRegionPutsAreDoneAndRebalanceCompletedThenStatsShouldBeCorrect() {
    MemberVM locator = clusterStartupRule.startLocatorVM(0);
    int locatorPort = locator.getPort();
    MemberVM server1 =
        clusterStartupRule.startServerVM(1, s -> s.withConnectionToLocator(locatorPort));
    MemberVM server2 =
        clusterStartupRule.startServerVM(2, s -> s.withConnectionToLocator(locatorPort));
    server1.invoke(() -> createPartitionedRegionWithRebalance(regionName, 0));

    server1.invoke(() -> {
      Cache cache = ClusterStartupRule.getCache();
      Region<Integer, Integer> region = cache.getRegion(regionName);
      for (int i = 0; i <= 5; i++) {
        region.put(i, i);
      }
    });

    server2.invoke(() -> createPartitionedRegionWithRebalance(regionName, 0));

    server1.invoke(() -> validateEntryCount(regionName, 3));
    server2.invoke(() -> validateEntryCount(regionName, 3));
  }
Test to ensure that tombstone entries are not counted as a part of region entries
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionStatsDistributedTest.java