@Test
  public void testParallelThreads() throws InterruptedException {
    RegionVersionHolder vh1 = new RegionVersionHolder(member());
    RegionVersionHolder vh2 = new RegionVersionHolder(member());

    int UPDATES = 50000;
    int NUM_UPDATERS = 20;
    int NUM_EXCEPTIONS = 500;

    Random random = new Random();
    IntOpenHashSet exceptions = new IntOpenHashSet();
    for (int i = 0; i < NUM_EXCEPTIONS; i++) {
      exceptions.add(i);
    }


    HolderUpdater[] updaters = new HolderUpdater[NUM_UPDATERS];
    for (int i = 0; i < updaters.length; i++) {
      updaters[i] = new HolderUpdater(UPDATES, i, NUM_UPDATERS, exceptions, vh1, vh2);
    }

    for (final HolderUpdater holderUpdater : updaters) {
      holderUpdater.start();
    }

    for (final HolderUpdater updater : updaters) {
      updater.join();
    }

    // System.out.println("testing vh1="+vh1);
    for (int i = 1; i < UPDATES; i++) {
      assertEquals("vector is incorrect on item " + i, !exceptions.contains(i), vh1.contains(i));
    }

    // Mimic a GII. Initialize vh2 from vh1. vh2 has not seen all of the updates
    vh2.initializeFrom(vh1);

    // System.out.println("testing vh2="+vh2);
    for (int i = 1; i < UPDATES; i++) {
      assertEquals("vector is incorrect on item " + i, !exceptions.contains(i), vh2.contains(i));
    }
  }
This tries to be a more "real life" test. A bunch of threads perform updates, which should
create exceptions. Verify that the final exception list is correct.
geode-core/src/test/java/org/apache/geode/internal/cache/versions/RegionVersionHolderRandomJUnitTest.java