Author: Tobias Nyholm (tobias.nyholm@gmail.com)
Inheritance: use trait Cache\Hierarchy\HierarchicalCachePoolTrait
 public function testKeyCache()
 {
     $path = null;
     $pool = new CachePool(['idx_1', 'idx_2', 'idx_3']);
     $result = $pool->exposeGetHierarchyKey('|foo', $path);
     $this->assertEqualsSha1('root!!idx_1!foo!!idx_2!', $result);
     $this->assertEqualsSha1('path!root!!idx_1!foo!', $path);
     // Make sure re reuse the old index value we already looked up for 'root'.
     $result = $pool->exposeGetHierarchyKey('|bar', $path);
     $this->assertEqualsSha1('root!!idx_1!bar!!idx_3!', $result);
     $this->assertEqualsSha1('path!root!!idx_1!bar!', $path);
 }