public function testLoadRoleIsMiss()
{
$this->loggerMock->expects($this->once())->method('logCall');
$cacheItemMock = $this->getMock('Stash\\Interfaces\\ItemInterface');
$this->cacheMock->expects($this->once())->method('getItem')->with('user', 'role', 33)->will($this->returnValue($cacheItemMock));
$cacheItemMock->expects($this->once())->method('get')->will($this->returnValue(null));
$cacheItemMock->expects($this->once())->method('isMiss')->will($this->returnValue(true));
$innerHandlerMock = $this->getMock('eZ\\Publish\\SPI\\Persistence\\User\\Handler');
$this->persistenceHandlerMock->expects($this->once())->method('userHandler')->will($this->returnValue($innerHandlerMock));
$innerHandlerMock->expects($this->once())->method('loadRole')->with(33)->will($this->returnValue(new Role()));
$cacheItemMock->expects($this->once())->method('set')->with($this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\User\\Role'))->will($this->returnValue($cacheItemMock));
$cacheItemMock->expects($this->once())->method('save')->with();
$handler = $this->persistenceCacheHandler->userHandler();
$handler->loadRole(33);
}