@Test
public void testOnlyOneIncompleteChunkHeader() throws Exception {

  File file = fsFactory.getFile(FILE_NAME);
  TsFileGeneratorForTest.writeFileWithOneIncompleteChunkHeader(file);
  RestorableTsFileIOWriter rWriter = new RestorableTsFileIOWriter(file);
  TsFileWriter writer = new TsFileWriter(rWriter);
  writer.close();
  assertEquals(TsFileIOWriter.magicStringBytes.length + TsFileIOWriter.versionNumberBytes.length,
      rWriter.getTruncatedSize());
  assertTrue(file.delete());
}