/**
  * @param ApplicationInterface $app
  *
  * @throws Exception
  */
 public function run(ApplicationInterface $app)
 {
     if (empty($app->getSteps()[$this->bootstrapStep])) {
         throw new Exception(sprintf('Cannot plug Beanstalk services registration to specified application step: "%s" because this step has not been defined.', $this->bootstrapStep));
     }
     $app->getStep($this->bootstrapStep)->plug([$this, 'registerServices']);
 }