static void maybeInjectFailure() {
      if (THROW_FAILURE_ON_INIT.get()) {
        throw new RuntimeException("Injected instantiation exception");
      }
    }
A custom WALCellCodec in which we can inject failure.
hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFactory.java