@Override
  public @Nullable String getFilename() {
    if (gcsPath.getNameCount() <= 1) {
      return null;
    } else {
      GcsPath gcsFilename = gcsPath.getFileName();
      return gcsFilename == null ? null : gcsFilename.toString();
    }
  }
@Test
  public void testGetFilename() {
    assertNull(toResourceIdentifier("gs://my_bucket/").getFilename());
    assertEquals("abc", toResourceIdentifier("gs://my_bucket/abc").getFilename());
    assertEquals("abc", toResourceIdentifier("gs://my_bucket/abc/").getFilename());
    assertEquals("xyz.txt", toResourceIdentifier("gs://my_bucket/abc/xyz.txt").getFilename());
  }