@Test
  public void testUnix_toUri() {
    URI fileUri = PathType.unix().toUri(fileSystemUri, "/", ImmutableList.of("foo", "bar"), false);
    assertThat(fileUri.toString()).isEqualTo("jimfs://foo/foo/bar");
    assertThat(fileUri.getPath()).isEqualTo("/foo/bar");

    URI directoryUri =
        PathType.unix().toUri(fileSystemUri, "/", ImmutableList.of("foo", "bar"), true);
    assertThat(directoryUri.toString()).isEqualTo("jimfs://foo/foo/bar/");
    assertThat(directoryUri.getPath()).isEqualTo("/foo/bar/");

    URI rootUri = PathType.unix().toUri(fileSystemUri, "/", ImmutableList.<String>of(), true);
    assertThat(rootUri.toString()).isEqualTo("jimfs://foo/");
    assertThat(rootUri.getPath()).isEqualTo("/");
  }
Tests for {@link UnixPathType}.

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