@Test
public void testOneDamagedCheck() throws IOException, SystemCheckException {

  File tempRoot = new File(TestConstant.BASE_OUTPUT_PATH.concat("root"));
  tempRoot.mkdir();
  try {
    for (int i = 0; i < 5; i++) {
      File subDir = new File(tempRoot, "storage_group" + i);
      subDir.mkdir();
      FileOutputStream fileOutputStream = new FileOutputStream(new File(subDir, WAL_FILE_NAME));
      try {
        fileOutputStream.write(i);
      } finally {
        fileOutputStream.close();
      }
    }
    WalChecker checker = new WalChecker(tempRoot.getAbsolutePath());
    assertEquals(5, checker.doCheck().size());
  } finally {
    FileUtils.deleteDirectory(tempRoot);
  }
}