public String toString(JimfsPath path) {
    Name root = path.root();
    String rootString = root == null ? null : root.toString();
    Iterable<String> names = Iterables.transform(path.names(), Functions.toStringFunction());
    return type.toString(rootString, names);
  }
@Test
  public void testToString() {
    // not much to test for this since it just delegates to PathType anyway
    JimfsPath path =
        new JimfsPath(service, null, ImmutableList.of(Name.simple("foo"), Name.simple("bar")));
    assertThat(service.toString(path)).isEqualTo("foo/bar");

    path = new JimfsPath(service, Name.simple("/"), ImmutableList.of(Name.simple("foo")));
    assertThat(service.toString(path)).isEqualTo("/foo");
  }