public function testTimingOut($count, $timeout, $delay)
{
$mutex = $this->buildRedisMutex($count, $timeout);
$mutex->expects($this->any())->method("add")->willReturnCallback(function () use($delay) {
usleep($delay);
return true;
});
$mutex->synchronized(function () {
$this->fail("Code should not be executed");
});
}