Code example for FileNotFoundException

Methods: getMessage

0
    LOG.info("Test Target Delete For listStatus");
    try { 
      fs.listStatus(TEST_PATH);
      fail("Test should fail with FileNotFoundException"); 
    } catch (FileNotFoundException e) {
      assertEquals("File " + TEST_PATH + " does not exist.", e.getMessage());
      LOG.info(StringUtils.stringifyException(e));
    } 
  } 
   
  /** Remove the target directory after the getListing RPC */ 
  @Test
  public void testTargetDeletionForListLocatedStatus() throws Exception {
    LOG.info("Test Target Delete For listLocatedStatus");
    RemoteIterator<LocatedFileStatus> itor = fs.listLocatedStatus(TEST_PATH);
    itor.next();
    assertFalse (itor.hasNext());
  } 
} 
Contextual code suggestions in your IDE  Get Codota for Java