@Override
  public String toString(@Nullable String root, Iterable<String> names) {
    StringBuilder builder = new StringBuilder();
    if (root != null) {
      builder.append(root);
    }
    joiner().appendTo(builder, names);
    return builder.toString();
  }
@Test
  public void testWindows_toUri_escaping() {
    URI uri =
        PathType.windows()
            .toUri(fileSystemUri, "C:\\", ImmutableList.of("Users", "foo", "My Documents"), true);
    assertThat(uri.toString()).isEqualTo("jimfs://foo/C:/Users/foo/My%20Documents/");
    assertThat(uri.getRawPath()).isEqualTo("/C:/Users/foo/My%20Documents/");
    assertThat(uri.getPath()).isEqualTo("/C:/Users/foo/My Documents/");
  }