@Nullable
  public CacheScope parent() {
    int r = mId.lastIndexOf(SEPARATOR, mLength - 1);
    if (r < 0) {
      return GLOBAL;
    } else if (r == 0) {
      return null;
    }
    return new CacheScope(mId, r, mLevel.parent());
  }
@Test
  public void parent() {
    CacheScope schema = CacheScope.create("schema");
    CacheScope table = CacheScope.create("schema.table");
    CacheScope partition = CacheScope.create("schema.table.partition");
    assertNull(CacheScope.GLOBAL.parent());
    assertNull(schema.parent().parent());
    assertEquals(CacheScope.GLOBAL, schema.parent());
    assertEquals(schema, table.parent());
    assertEquals(table, partition.parent());
    assertEquals(CacheScope.create("schema.table.partition1").parent(),
        CacheScope.create("schema.table.partition2").parent());
    assertEquals(CacheScope.create("schema.table.part").parent(),
        CacheScope.create("schema.table.partition").parent());
    assertEquals(CacheScope.create("schema.table.part").parent().parent(),
        CacheScope.create("schema.table").parent());
  }