@CanIgnoreReturnValue
  public PathSubject hasRootComponent(@Nullable String root) {
    Path rootComponent = actual.getRoot();
    if (root == null && rootComponent != null) {
      failWithActual("expected to have root component", root);
    } else if (root != null && !root.equals(rootComponent.toString())) {
      failWithActual("expected to have root component", root);
    }
    return this;
  }
Asserts that the path has the given root component.
jimfs/src/test/java/com/google/common/jimfs/PathSubject.java