### Question:
TempletonUtils { public static String hadoopFsFilename(String fname, Configuration conf, String user) throws URISyntaxException, FileNotFoundException, IOException, InterruptedException { Path p = hadoopFsPath(fname, conf, user); if (p == null) return null; else return p.toString(); }  static boolean isset(String s); static boolean isset(char ch); static boolean isset(T[] a); static boolean isset(Collection<T> col); static boolean isset(Map<K, V> col); static String extractPercentComplete(String line); static String extractChildJobId(String line); static String encodeArray(String[] plain); static String encodeArray(List<String> list); static String[] decodeArray(String s); static String[] hadoopFsListAsArray(String files, Configuration conf,
                                               String user); static String hadoopFsListAsString(String files, Configuration conf,
                                              String user); static String hadoopFsFilename(String fname, Configuration conf, String user); static boolean hadoopFsIsMissing(FileSystem fs, Path p); static Path hadoopFsPath(String fname, Configuration conf, String user); static int fetchUrl(URL url); static Map<String, String> hadoopUserEnv(String user,
                                                    String overrideClasspath); static final Pattern JAR_COMPLETE; static final Pattern PIG_COMPLETE; static final Pattern JAR_ID; static final Pattern PIG_ID; static final Pattern[] ID_PATTERNS; }### Answer:
@Test public void testHadoopFsFilename() { try { Assert.assertEquals(null, TempletonUtils.hadoopFsFilename(null, null, null)); Assert.assertEquals(null, TempletonUtils.hadoopFsFilename("/tmp", null, null)); Assert.assertEquals("file:/tmp", TempletonUtils.hadoopFsFilename("/tmp", new Configuration(), null)); } catch (FileNotFoundException e) { Assert.fail("Couldn't find name for /tmp"); } catch (Exception e) { e.printStackTrace(); } try { TempletonUtils.hadoopFsFilename("/scoobydoo/teddybear", new Configuration(), null); Assert.fail("Should not have found /scoobydoo/teddybear"); } catch (FileNotFoundException e) { } catch (Exception e) { e.printStackTrace(); } }