public function testReleaseTooFewKeys($count, $available)
{
$mutex = $this->buildRedisMutex($count);
$mutex->expects($this->any())->method("add")->willReturn(true);
$i = 0;
$mutex->expects($this->any())->method("evalScript")->willReturnCallback(function () use(&$i, $available) {
$i++;
return $i <= $available;
});
$mutex->synchronized(function () {
});
}