protected function abortIfUnregisteredArgumentsExist($expectedArguments, $actualArguments)
    {
        $expectedArgumentNames = array();
        /** @var $expectedArgument ArgumentDefinition */
        foreach ($expectedArguments as $expectedArgument) {
            $expectedArgumentNames[] = $expectedArgument->getName();
        }

        foreach (array_keys($actualArguments) as $argumentName) {
            if (!in_array($argumentName, $expectedArgumentNames)) {
                throw new Exception('Argument "' . $argumentName . '" was not registered.', 1237823695);
            }
        }
    }