@Override
  public String toString() {
    return pathString;
  }
@Test
  public void testToString() throws Exception {
    File someFile = tmpFolder.newFile("somefile");
    LocalResourceId fileResource =
        LocalResourceId.fromPath(someFile.toPath(), /* isDirectory */ false);
    assertThat(fileResource.toString(), not(endsWith(File.separator)));
    assertThat(fileResource.toString(), containsString("somefile"));
    assertThat(fileResource.toString(), startsWith(tmpFolder.getRoot().getAbsolutePath()));

    LocalResourceId dirResource =
        LocalResourceId.fromPath(someFile.toPath(), /* isDirectory */ true);
    assertThat(dirResource.toString(), endsWith(File.separator));
    assertThat(dirResource.toString(), containsString("somefile"));
    assertThat(dirResource.toString(), startsWith(tmpFolder.getRoot().getAbsolutePath()));
  }