Code example for FileNotFoundException

Methods: getMessage

0
    try { 
      fs.listStatus(new Path("/"));
      assertTrue("Should've thrown.", false); 
    } catch (FileNotFoundException ex) {
      assertTrue("Unexpected exception: " + ex,
          ex.getMessage().contains("does not exist."));
    } 
    assertFalse(container.exists());
 
    // Create a container outside of the WASB FileSystem 
    container.create();
    // Add a file to the container outside of the WASB FileSystem 
    CloudBlockBlob blob = testAccount.getBlobReference("foo");
    BlobOutputStream outputStream = blob.openOutputStream();
    outputStream.write(new byte[10]);
    outputStream.close();
 
    // Make sure the file is visible 
    assertTrue(fs.exists(new Path("/foo")));
    assertTrue(container.exists());