private void validateExceptions(RegionVersionHolder<?> holder) {
    if (holder.getExceptionForTest() != null) {
      for (RVVException ex : holder.getExceptionForTest()) {
        // now it allows the special exception whose nextVersion==holder.version+1
        if (ex.nextVersion > holder.version + 1) {
          Assert.assertTrue(false, "next version too large next=" + ex.nextVersion
              + " holder version " + holder.version);
        }

        if (ex.nextVersion <= ex.previousVersion) {
          Assert.assertTrue(false,
              "bad next and previous next=" + ex.nextVersion + ", previous=" + ex.previousVersion);
        }

        for (RVVException.ReceivedVersionsReverseIterator it =
            ex.receivedVersionsReverseIterator(); it.hasNext();) {
          Long received = it.next();
          if (received >= ex.nextVersion) {
            Assert.assertTrue(false, "received greater than next next=" + ex.nextVersion
                + ", received=" + received + " exception=" + ex);
          }

          if (received <= ex.previousVersion) {
            Assert.assertTrue(false, "received less than previous prev=" + ex.previousVersion
                + ", received=" + received);
          }
        }
        if (ex.nextVersion - ex.previousVersion > 1000000) {
          Assert.assertTrue(false, "to large a gap in exceptions prev=" + ex.previousVersion
              + ", next=" + ex.nextVersion);
        }
      }
    }
  }
For test purposes, make sure this version holder is internally consistent.
geode-core/src/test/java/org/apache/geode/internal/cache/versions/RegionVersionHolderJUnitTest.java