@Test
public void testListStatusErrorOnNonExistantDir() throws IOException {

  Configuration conf = new Configuration();
  conf.setInt(FileInputFormat.LIST_STATUS_NUM_THREADS, numThreads);
  configureTestErrorOnNonExistantDir(conf, localFs);
  Job job  = Job.getInstance(conf);
  FileInputFormat<?, ?> fif = new TextInputFormat();
  try {
    fif.listStatus(job);
    Assert.fail("Expecting an IOException for a missing Input path");
  } catch (IOException e) {
    Path expectedExceptionPath = new Path(TEST_ROOT_DIR, "input2");
    expectedExceptionPath = localFs.makeQualified(expectedExceptionPath);
    Assert.assertTrue(e instanceof InvalidInputException);
    Assert.assertEquals(
        "Input path does not exist: " + expectedExceptionPath.toString(),
        e.getMessage());
  }
}