@Test
  public void testCrazyRandomChanges() throws Exception {
    prepareTest("RandomChanges");
    Random rand = ThreadLocalRandom.current();
    for (int i = 0; i < 10; ++i) {
      int encodingOrdinal = rand.nextInt(DataBlockEncoding.values().length);
      DataBlockEncoding encoding = DataBlockEncoding.values()[encodingOrdinal];
      setEncodingConf(encoding, rand.nextBoolean());
      writeSomeNewData();
      verifyAllData();
    }
  }
A zero-based index of the current batch of test data being written
hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java