@Override
    public List<Path> flushSnapshot(MemStoreSnapshot snapshot, long cacheFlushId,
      MonitoredTask status, ThroughputController throughputController,
      FlushLifeCycleTracker tracker, Consumer<Path> writerCreationTracker) throws IOException {
      if (throwExceptionWhenFlushing.get()) {
        throw new IOException("Simulated exception by tests");
      }
      return super.flushSnapshot(snapshot, cacheFlushId, status, throughputController, tracker,
        writerCreationTracker);
    }
Test that we recover correctly when there is a failure in between the flushes. i.e. Some stores
got flushed but others did not.
<p/>
Unfortunately, there is no easy hook to flush at a store level. The way we get around this is
by flushing at the region level, and then deleting the recently flushed store file for one of
the Stores. This would put us back in the situation where all but that store got flushed and
the region died.
<p/>
We restart Region again, and verify that the edits were replayed.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/AbstractTestWALReplay.java