@Test
  public void testPathCreation() {
    assertAbout(paths())
        .that(service.emptyPath())
        .hasRootComponent(null)
        .and()
        .hasNameComponents("");

    assertAbout(paths())
        .that(service.createRoot(service.name("/")))
        .isAbsolute()
        .and()
        .hasRootComponent("/")
        .and()
        .hasNoNameComponents();

    assertAbout(paths())
        .that(service.createFileName(service.name("foo")))
        .hasRootComponent(null)
        .and()
        .hasNameComponents("foo");

    JimfsPath relative = service.createRelativePath(service.names(ImmutableList.of("foo", "bar")));
    assertAbout(paths())
        .that(relative)
        .hasRootComponent(null)
        .and()
        .hasNameComponents("foo", "bar");

    JimfsPath absolute =
        service.createPath(service.name("/"), service.names(ImmutableList.of("foo", "bar")));
    assertAbout(paths())
        .that(absolute)
        .isAbsolute()
        .and()
        .hasRootComponent("/")
        .and()
        .hasNameComponents("foo", "bar");
  }
Tests for {@link PathService}.

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