@Test
  public void testMovedWALDuringRecovery() throws Exception {
    // This partial mock will throw LEE for every file simulating
    // files that were moved
    FileSystem spiedFs = Mockito.spy(fs);
    // The "File does not exist" part is very important,
    // that's how it comes out of HDFS
    Mockito.doThrow(new LeaseExpiredException("Injected: File does not exist")).when(spiedFs)
      .append(Mockito.<Path> any());
    retryOverHdfsProblem(spiedFs);
  }
@param spiedFs should be instrumented for failure.
hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALSplit.java