public function processCacheSegmentsSetsLifetimeFromMetadata()
{
$contentCache = new ContentCache();
$mockSecurityContext = $this->createMock(Context::class);
$this->inject($contentCache, 'securityContext', $mockSecurityContext);
$this->inject($contentCache, 'parser', new CacheSegmentParser());
$mockCache = $this->createMock(FrontendInterface::class);
$this->inject($contentCache, 'cache', $mockCache);
$segement = $contentCache->createCacheSegment('My content', '/foo/bar', array(42), array('Foo', 'Bar'), 60);
$mockCache->expects($this->once())->method('set')->with($this->anything(), $this->anything(), $this->anything(), 60);
$contentCache->processCacheSegments($segement);
}