code: public function clearEvents($testSessionId)
      {
          $extendedState = $this->getExtendedState($testSessionId);
          $extendedState->clearEvents();
          $extendedState->save();
      }
docs: Removes all events from the queue
  @param $testSessionId
  @throws \common_Exception