public static void delete(String path) {
    try {
      Files.delete(Paths.get(path));
    } catch (java.nio.file.InvalidPathException e) {
      throw new InvalidArgumentRuntimeException(e);
    } catch (NoSuchFileException e) {
      throw new NotFoundRuntimeException(e);
    } catch (DirectoryNotEmptyException e) {
      throw new FailedPreconditionRuntimeException(e);
    } catch (SecurityException e) {
      throw new PermissionDeniedRuntimeException(e);
    } catch (IOException e) {
      throw new UnknownRuntimeException(e);
    }
  }
@Test
  public void deleteNonExistentFile() {
    // ghostFile is never created, so deleting should fail
    File ghostFile = new File(mTestFolder.getRoot(), "ghost.txt");
    mException.expect(NotFoundRuntimeException.class);
    FileUtils.delete(ghostFile.getAbsolutePath());
    fail("deleting a non-existent file should have failed");
  }