@Nullable
  public AlluxioURI getParent() {
    String path = mUri.getPath();
    int lastSlash = path.lastIndexOf('/');
    int start = hasWindowsDrive(path, true) ? 3 : 0;
    if ((path.length() == start) // empty path
        || (lastSlash == start && path.length() == start + 1)) { // at root
      return null;
    }
    String parent;
    if (lastSlash == -1) {
      parent = CUR_DIR;
    } else {
      int end = hasWindowsDrive(path, true) ? 3 : 0;
      parent = path.substring(0, lastSlash == end ? end + 1 : lastSlash);
    }
    return new AlluxioURI(this, parent, false);
  }
@Test
  public void getParentTests() {
    assertEquals(null, new AlluxioURI("/").getParent());
    assertEquals(null,
        new AlluxioURI("alluxio://localhost/").getParent());
    assertEquals(new AlluxioURI("alluxio://localhost/"),
        new AlluxioURI("alluxio://localhost/a").getParent());
    assertEquals(new AlluxioURI("/a"), new AlluxioURI("/a/b/../c").getParent());
    assertEquals(new AlluxioURI("alluxio:/a"),
        new AlluxioURI("alluxio:/a/b/../c").getParent());
    assertEquals(new AlluxioURI("alluxio://localhost:80/a"), new AlluxioURI(
        "alluxio://localhost:80/a/b/../c").getParent());
  }