private void checkForConsistencyErrors(String regionName) {
    Map<Object, Object> r0Contents = vm0.invoke(() -> getRegionContents(regionName));
    Map<Object, Object> r1Contents = vm1.invoke(() -> getRegionContents(regionName));

    for (int i = 0; i < NUMBER_OF_PUTS; i++) {
      String theKey = regionName + THE_KEY + i;
      if (r0Contents.containsKey(theKey)) {
        assertThat(r1Contents.get(theKey))
            .as("region contents are not consistent for key %s", theKey)
            .isEqualTo(r0Contents.get(theKey));
      } else {
        assertThat(r1Contents).as("expected containsKey for %s to return false", theKey)
            .doesNotContainKey(theKey);
      }
    }
  }
Get region contents from each member and verify they are consistent
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClearTXLockingDUnitTest.java