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

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

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

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