@Override
  public String getFilename() {
    if (isDirectory()) {
      Path parentPath = new Path(uri).getParent();
      return parentPath == null ? null : parentPath.getName();
    }
    return new Path(uri).getName();
  }
@Test
  public void testGetFilename() {
    assertNull(toResourceIdentifier("").getFilename());
    assertEquals("abc", toResourceIdentifier("/dirA/abc").getFilename());
    assertEquals("abc", toResourceIdentifier("/dirA/abc/").getFilename());
    assertEquals("xyz.txt", toResourceIdentifier("/dirA/abc/xyz.txt").getFilename());
  }