protected function removeMockFromMocksCollection($mockName, $collection)
    {
        if (!isset($this->expectedMocksCollections[$collection][$mockName])) {
            throw new \InvalidArgumentException(sprintf('The required mock "%s" doesn\'t exist in collection "%s".', $mockName, $collection));
        }

        $return = $this->expectedMocksCollections[$collection][$mockName];
        unset($this->expectedMocksCollections[$collection][$mockName]);

        return $return;
    }