protected function getCollectedEmails() {
    $this->getCore()->state()->resetCache();
    $test_mail_collector = $this->getCore()->state()->get('system.test_mail_collector');
    if (!$test_mail_collector) {
      $test_mail_collector = [];
    }

    return $test_mail_collector;
  }