@Override
  public FileFormatUtils getFileFormatUtils(HoodieFileFormat fileFormat) {
    switch (fileFormat) {
      case PARQUET:
        return new ParquetUtils();
      case ORC:
        return new OrcUtils();
      case HFILE:
        return new HFileUtils();
      default:
        throw new UnsupportedOperationException(fileFormat.name() + " format not supported yet.");
    }
  }
@Test
  public void testGetFileFormatUtils() throws IOException {
    try (HoodieStorage storage =
             new HoodieHadoopStorage(HadoopFSUtils.getFs(DEFAULT_URI, getDefaultStorageConf()))) {
      HoodieIOFactory ioFactory = new HoodieHadoopIOFactory(storage);
      assertTrue(ioFactory.getFileFormatUtils(new StoragePath("file:///a/b.parquet")) instanceof ParquetUtils);
      assertTrue(ioFactory.getFileFormatUtils(new StoragePath("file:///a/b.orc")) instanceof OrcUtils);
      assertTrue(ioFactory.getFileFormatUtils(new StoragePath("file:///a/b.hfile")) instanceof HFileUtils);
      assertThrows(
          UnsupportedOperationException.class,
          () -> ioFactory.getFileFormatUtils(new StoragePath("file:///a/b.log")));

      assertTrue(ioFactory.getFileFormatUtils(HoodieFileFormat.PARQUET) instanceof ParquetUtils);
      assertTrue(ioFactory.getFileFormatUtils(HoodieFileFormat.ORC) instanceof OrcUtils);
      assertTrue(ioFactory.getFileFormatUtils(HoodieFileFormat.HFILE) instanceof HFileUtils);
      assertThrows(
          UnsupportedOperationException.class,
          () -> ioFactory.getFileFormatUtils(HoodieFileFormat.HOODIE_LOG));
    }
  }