protected function resolveFactory(string $factory_class) : FactoryInterface {
    // If the requested factory is the default.
    if ($this->factoryClass == $factory_class) {
      // If we've not yet instantiated the default.
      if (empty($this->factory)) {
        $this->factory = $this->factoryResolver->getFactoryInstance($this->factoryClass);
      }
      // Return the default.
      return $this->factory;
    }
    // If the requested factory is NOT the default.
    return $this->factoryResolver->getFactoryInstance($factory_class);
  }