@Test
public void testRecoveryFixBrokenFile() throws Exception {

    // Arrange
    File logfile = new File(new File(mySnapDir, "version-2"), "log.42");
    TxnLogToolkit lt = new TxnLogToolkit(true, false, logfile.toString(), true);
    // Act
    lt.dump(null);
    // Assert
    String output = outContent.toString();
    assertThat(output, containsString("CRC FIXED"));
    // Should be able to dump the recovered logfile with no CRC error
    outContent.reset();
    logfile = new File(new File(mySnapDir, "version-2"), "log.42.fixed");
    lt = new TxnLogToolkit(false, false, logfile.toString(), true);
    lt.dump(null);
    output = outContent.toString();
    assertThat(output, not(containsString("CRC ERROR")));
}