public function withFactory($factory)
    {
        if (!is_callable($factory)) {
            throw new \InvalidArgumentException("Factory isn't callable");
        }
        
        $runner = clone $this;
        $runner->factory = $factory;
        
        return $runner;
    }