protected function getPrototypeStrategyByName(ServiceLocatorInterface $serviceLocator, $name)
    {
        $obj = $serviceLocator->get($name);
        if (!$obj instanceof PrototypeStrategyInterface) {
            throw new Exception\RuntimeException(sprintf(
                'Instance of type %s is invalid; must implement %s',
                (is_object($obj) ? get_class($obj) : gettype($obj)),
                PrototypeStrategyInterface::class
            ));
        }
        return $obj;
    }