@Test
  public void testBug36109() throws Exception {
    LogWriterUtils.getLogWriter().info("testBug36109 : BEGIN");
    client1.invoke(() -> StatsBugDUnitTest.createClientCacheForInvalidates(
        NetworkUtils.getServerHostName(Host.getHost(0)), PORT1, PORT2));
    client1.invoke(StatsBugDUnitTest::prepopulateClient);
    primary.invoke(() -> StatsBugDUnitTest.doEntryOperations(primaryPrefix));
    Wait.pause(3000);
    primary.invoke(StatsBugDUnitTest::stopServer);
    try {
      Thread.sleep(5000);
    } catch (InterruptedException ignore) {
      fail("interrupted");
    }

    secondary.invoke(() -> StatsBugDUnitTest.doEntryOperations(secondaryPrefix));
    try {
      Thread.sleep(5000);
    } catch (InterruptedException ignore) {
      fail("interrupted");
    }

    client1.invoke(StatsBugDUnitTest::verifyNumInvalidates);
    LogWriterUtils.getLogWriter().info("testBug36109 : END");
  }
This test does the following:<br>
1)Create and populate the client<br>
2)Do some operations from the primary cache-server<br>
3)Stop the primary cache-server<br>
4)Wait some time to allow client to failover to secondary and do some operations from
secondary<br>
5)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