/**
  * @param TestSessionMemento $sessionMemento
  */
 protected function triggerStateChanged(TestSessionMemento $sessionMemento)
 {
     $event = new QtiTestStateChangeEvent($this, $sessionMemento);
     if ($event instanceof ServiceLocatorAwareInterface) {
         $event->setServiceLocator($this->getServiceLocator());
     }
     $this->getEventManager()->trigger($event);
 }