@Test
  public void testToString() {
    ParseResult path = type.parsePath("foo/bar\\baz");
    assertThat(type.toString(path.root(), path.names())).isEqualTo("foo/bar/baz");

    ParseResult path2 = type.parsePath("$/foo/bar");
    assertThat(type.toString(path2.root(), path2.names())).isEqualTo("$foo/bar");
  }
Tests for {@link PathType}.

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