@Test
public void testHadoopFsListAsString() {

  try {
    String tmpFileName1 = "/tmp/testHadoopFsListAsString1";
    String tmpFileName2 = "/tmp/testHadoopFsListAsString2";
    File tmpFile1 = new File(tmpFileName1);
    File tmpFile2 = new File(tmpFileName2);
    tmpFile1.createNewFile();
    tmpFile2.createNewFile();
    Assert.assertTrue(TempletonUtils.hadoopFsListAsString(null, null, null) == null);
    Assert.assertTrue(TempletonUtils.hadoopFsListAsString("/tmp,/usr",
      null, null) == null);
    Assert.assertEquals("file:" + tmpFileName1 + ",file:" + tmpFileName2,
      TempletonUtils.hadoopFsListAsString
      (tmpFileName1 + "," + tmpFileName2, new Configuration(), null));
  } catch (FileNotFoundException e) {
    Assert.fail("Couldn't find name for " + tmpFile.toURI().toString());
  } catch (Exception e) {
    // Something else is wrong
    e.printStackTrace();
  }
  try {
    TempletonUtils.hadoopFsListAsString("/scoobydoo/teddybear,joe",
                      new Configuration(),
                      null);
    Assert.fail("Should not have found /scoobydoo/teddybear");
  } catch (FileNotFoundException e) {
    // Should go here.
  } catch (Exception e) {
    // Something else is wrong.
    e.printStackTrace();
  }
}