protected static function validateProcessor($processor)
    {
        if (!is_subclass_of($processor, AbstractProcessor::class)) {
            throw new InvalidArgumentException('Processor must be an instanceof ' . AbstractProcessor::class);
        }
        return is_string($processor) ? new $processor() : $processor;
    }