### Question:
SegmentGenerationUtils { public static String getFileName(URI inputFileURI) { String scheme = inputFileURI.getScheme(); if (scheme != null && scheme.equalsIgnoreCase("file")) { return new File(inputFileURI).getName(); } String[] pathSplits = inputFileURI.getPath().split("/"); return pathSplits[pathSplits.length - 1]; }  static String generateSchemaURI(String controllerUri, String table); static String generateTableConfigURI(String controllerUri, String table); static Schema getSchema(String schemaURIString); static TableConfig getTableConfig(String tableConfigURIStr); static URI getRelativeOutputPath(URI baseInputDir, URI inputFile, URI outputDir); static String getFileName(URI inputFileURI); static final String PINOT_PLUGINS_TAR_GZ; static final String PINOT_PLUGINS_DIR; }### Answer:
@Test public void testExtractFileNameFromURI() { Assert.assertEquals(SegmentGenerationUtils.getFileName(URI.create("file:/var/data/myTable/2020/04/06/input.data")), "input.data"); Assert.assertEquals(SegmentGenerationUtils.getFileName(URI.create("/var/data/myTable/2020/04/06/input.data")), "input.data"); Assert.assertEquals(SegmentGenerationUtils .getFileName(URI.create("dbfs:/mnt/mydb/mytable/pt_year=2020/pt_month=4/pt_date=2020-04-01/input.data")), "input.data"); Assert.assertEquals(SegmentGenerationUtils.getFileName(URI.create("hdfs: "input.data"); }