@Override
  public @Nullable String getFilename() {
    Path fileName = getPath().getFileName();
    return fileName == null ? null : fileName.toString();
  }
@Test
  public void testGetFilename() {
    assertNull(toResourceIdentifier("/").getFilename());
    assertEquals("tmp", toResourceIdentifier("/root/tmp").getFilename());
    assertEquals("tmp", toResourceIdentifier("/root/tmp/").getFilename());
    assertEquals("xyz.txt", toResourceIdentifier("/root/tmp/xyz.txt").getFilename());
  }