private void assertResolvedPathEquals(
      String expected, Path path, String firstResolvePath, String... moreResolvePaths) {
    Path resolved = path.resolve(firstResolvePath);
    for (String additionalPath : moreResolvePaths) {
      resolved = resolved.resolve(additionalPath);
    }
    assertPathEquals(expected, resolved);

    Path relative = pathService.parsePath(firstResolvePath, moreResolvePaths);
    resolved = path.resolve(relative);
    assertPathEquals(expected, resolved);

    // assert the invariant that p.relativize(p.resolve(q)).equals(q) when q does not have a root
    // p = path, q = relative, p.resolve(q) = resolved
    if (relative.getRoot() == null) {
      assertEquals(relative, path.relativize(resolved));
    }
  }
Tests for {@link JimfsPath}.

@author Colin Decker
jimfs/src/test/java/com/google/common/jimfs/JimfsPathTest.java