@Test
  public void recordOneVersionPastBitSetWidthShouldMoveBitSet() {
    RegionVersionHolder h = createHolder(true);

    LongStream.range(1, BIT_SET_WIDTH + 1).forEach(h::recordVersion);
    assertEquals(1, h.getBitSetVersionForTesting());
    BitSet expectedBitSet = new BitSet(BIT_SET_WIDTH);
    expectedBitSet.set(0, BIT_SET_WIDTH);
    assertEquals(expectedBitSet, h.getBitSetForTesting());

    h.recordVersion(BIT_SET_WIDTH + 1);
    assertEquals(BIT_SET_WIDTH * 3 / 4 + 1, h.getBitSetVersionForTesting());
    assertEquals(bitSet(IntStream.range(0, (BIT_SET_WIDTH / 4) + 1).toArray()),
        h.getBitSetForTesting());
    assertContains(h, LongStream.range(0, BIT_SET_WIDTH + 2).toArray());
    assertHasExceptions(h);
  }
Tests of how the RegionVersionHolder maintains it's bitset under updates
geode-core/src/test/java/org/apache/geode/internal/cache/versions/RegionVersionHolderBitSetJUnitTest.java