public function create(Call $call, $iterable): IterableSpy
    {
        if ($iterable instanceof Traversable) {
            return new TraversableSpy(
                $call,
                $iterable,
                $this->callEventFactory
            );
        }

        if (is_array($iterable)) {
            return new ArraySpy($call, $iterable, $this->callEventFactory);
        }

        if (is_object($iterable)) {
            $type = var_export(get_class($iterable), true);
        } else {
            $type = gettype($iterable);
        }

        throw new InvalidArgumentException(
            sprintf('Unsupported iterable of type %s.', $type)
        );
    }