private function getRepositoryMockTrhowingNotFoundException()
 {
     $keyValue = new KeyValue(self::IRRELEVANT_KEY, self::IRRELEVANT_VALUE);
     $past = time() - 1;
     $keyValue->setExpirationTimestamp($past);
     $mock = $this->getMockBuilder(self::KEY_VALUE_REPOSITORY_CLASS)->disableOriginalConstructor()->getMock();
     $mock->expects($this->once())->method('findElement')->will($this->throwException(new KeyNotFoundException(self::IRRELEVANT_KEY, self::IRRELEVANT_VALUE)));
     return $mock;
 }