@Override
  public Iterator<Path> iterator() {
    return new NameIterator(fs, !bucket.isEmpty(), bucketAndObject());
  }
@Test
  public void testIterator() {
    GcsPath a = GcsPath.fromComponents("bucket", "a/b/c");
    Iterator<Path> it = a.iterator();

    assertTrue(it.hasNext());
    assertEquals("gs://bucket/", it.next().toString());
    assertTrue(it.hasNext());
    assertEquals("a", it.next().toString());
    assertTrue(it.hasNext());
    assertEquals("b", it.next().toString());
    assertTrue(it.hasNext());
    assertEquals("c", it.next().toString());
    assertFalse(it.hasNext());
  }