private void assertIsOriginal(Path path, boolean expected) throws FileNotFoundException, IOException {
    FileSystem fs = FileSystem.get(hiveConf);
    RemoteIterator<LocatedFileStatus> lfs = fs.listFiles(path, true);
    boolean foundAnyFile = false;
    while (lfs.hasNext()) {
      LocatedFileStatus lf = lfs.next();
      Path file = lf.getPath();
      if (!file.getName().startsWith(".") && !file.getName().startsWith("_")) {
        try (Reader reader = OrcFile.createReader(file, OrcFile.readerOptions(new Configuration()))) {
          OrcProto.Footer footer = reader.getFileTail().getFooter();
          assertEquals("Reader based original check", expected, OrcInputFormat.isOriginal(reader));
          assertEquals("Footer based original check", expected, OrcInputFormat.isOriginal(footer));
        }
        foundAnyFile = true;
      }
    }
    assertTrue("Checking if any file found to check", foundAnyFile);
  }
Checks if the file format is original or ACID file based on OrcInputFormat static methods.
@param path The file to check
@param expected The expected result of the isOriginal
@throws IOException Error when reading the file
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/TestAcidOnTez.java