@Test
  public void testUnix() {
    PathType unix = PathType.unix();
    assertThat(unix.getSeparator()).isEqualTo("/");
    assertThat(unix.getOtherSeparators()).isEqualTo("");

    // "//foo/bar" is what will be passed to parsePath if "/", "foo", "bar" is passed to getPath
    PathType.ParseResult path = unix.parsePath("//foo/bar");
    assertParseResult(path, "/", "foo", "bar");
    assertThat(unix.toString(path.root(), path.names())).isEqualTo("/foo/bar");

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

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