public static void verifyNumInvalidates() {
    long invalidatesRecordedByStats = pool.getInvalidateCount();
    LogWriterUtils.getLogWriter()
        .info("invalidatesRecordedByStats = " + invalidatesRecordedByStats);

    int expectedInvalidates = TOTAL_SERVERS * PUTS_PER_SERVER;
    LogWriterUtils.getLogWriter().info("expectedInvalidates = " + expectedInvalidates);

    if (invalidatesRecordedByStats != expectedInvalidates) {
      fail("Invalidates received by client(" + invalidatesRecordedByStats
          + ") does not match with the number of operations(" + expectedInvalidates
          + ") done at server");
    }
  }
Verify that the invalidates stats at the client accounts for the operations done by both,
primary and secondary.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ha/StatsBugDUnitTest.java