@Test
  public void testCloseWALFinishWriterThreadsFailed() throws IOException {
    RecoveredEditsOutputSink spyOutputSink = Mockito.spy(outputSink);
    Mockito.doReturn(false).when(spyOutputSink).finishWriterThreads();
    spyOutputSink.close();
    Mockito.verify(spyOutputSink, Mockito.times(1)).finishWriterThreads();
    Mockito.verify(spyOutputSink, Mockito.times(1)).closeWriters(false);
  }
When finishWriterThreads fails but does not throw an exception, ensure the writers are handled
like in the exception case - the writers are closed but the recoveredEdits WAL files are not
renamed.
hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestRecoveredEditsOutputSink.java