@Test
public void testHadoopFsPath() {

  try {
    TempletonUtils.hadoopFsPath(null, null, null);
    TempletonUtils.hadoopFsPath(tmpFile.toURI().toString(), null, null);
    TempletonUtils.hadoopFsPath(tmpFile.toURI().toString(), new Configuration(), null);
  } catch (FileNotFoundException e) {
    Assert.fail("Couldn't find " + tmpFile.toURI().toString());
  } catch (Exception e) {
    // This is our problem -- it means the configuration was wrong.
    e.printStackTrace();
  }
  try {
    TempletonUtils.hadoopFsPath("/scoobydoo/teddybear",
                  new Configuration(), null);
    Assert.fail("Should not have found /scoobydoo/teddybear");
  } catch (FileNotFoundException e) {
    // Should go here.
  } catch (Exception e) {
    // This is our problem -- it means the configuration was wrong.
    e.printStackTrace();
  }
  try {
    TempletonUtils.hadoopFsPath("a", new Configuration(), "teddybear");
    Assert.fail("Should not have found /user/teddybear/a");
  } catch (FileNotFoundException e) {
    Assert.assertTrue(e.getMessage().contains("/user/teddybear/a"));
  } catch (Exception e) {
    // This is our problem -- it means the configuration was wrong.
    e.printStackTrace();
    Assert.fail("Get wrong exception: " + e.getMessage());
  }
}