connectTo(idOrAdapter) {
    const { container, adapters } = this;
    let adapterId = idOrAdapter;

    if (typeof idOrAdapter === 'function') {
      container.register(idOrAdapter);
      adapterId = idOrAdapter.id;
    }

    assert(
      `Adapter matching the name \`${adapterId}\` was not registered.`,
      container.has(`adapter:${adapterId}`)
    );

    this.disconnectFrom(adapterId);

    const adapter = new (container.lookup(`adapter:${adapterId}`))(this);

    adapter.connect();
    adapters.set(adapterId, adapter);
  }
@param {String|Function} idOrFactory
@public
@memberof Polly