public static PinotFS getOutputPinotFS(Map<String, String> taskConfigs, URI fileURI)
      throws Exception {
    String fileURIScheme = (fileURI == null) ? null : fileURI.getScheme();
    if (fileURIScheme == null) {
      return new LocalPinotFS();
    }
    // Try to create PinotFS using given Input FileSystem config always
    String fsClass = taskConfigs.get(BatchConfigProperties.OUTPUT_FS_CLASS);
    if (fsClass != null) {
      PinotFS pinotFS = PluginManager.get().createInstance(fsClass);
      PinotConfiguration fsProps = IngestionConfigUtils.getOutputFsProps(taskConfigs);
      pinotFS.init(fsProps);
      return pinotFS;
    }
    return PinotFSFactory.create(fileURIScheme);
  }
@Test
  public void testGetOutputPinotFS() throws Exception {
    Map<String, String> taskConfigs = new HashMap<>();
    taskConfigs.put("output.fs.className", "org.apache.pinot.spi.filesystem.LocalPinotFS");
    URI fileURI = new URI("file:///path/to/file");

    PinotFS pinotFS = MinionTaskUtils.getOutputPinotFS(taskConfigs, fileURI);

    assertTrue(pinotFS instanceof LocalPinotFS);
  }