public function testUnlockAfterCode() { $this->mutex->expects($this->once())->method("unlock"); $this->mutex->synchronized(function () { }); }