@Override
  public JimfsPath resolveSibling(Path other) {
    JimfsPath otherPath = checkPath(other);
    if (otherPath == null) {
      throw new ProviderMismatchException(other.toString());
    }

    if (otherPath.isAbsolute()) {
      return otherPath;
    }
    JimfsPath parent = getParent();
    if (parent == null) {
      return otherPath;
    }
    return parent.resolve(other);
  }
@Test
  public void testResolveSibling_givenEmptyPath() {
    Path path = pathService.parsePath("foo/bar");
    Path resolved = path.resolveSibling("");
    assertPathEquals("foo", resolved);

    path = pathService.parsePath("foo");
    resolved = path.resolveSibling("");
    assertPathEquals("", resolved);
  }