code: public function setCatValue($testSessionId, $assessmentSectionId, $key, $value)
      {
          $extendedState = $this->getExtendedState($testSessionId);
          $extendedState->setCatValue($assessmentSectionId, $key, $value);
          $extendedState->save();
      }
docs: Set a CAT Value
  
  Set a CAT value in the Extended State.
  
  @param string $testSessionId
  @param string $assessmentSectionId
  @param string $key
  @param string $value
  @throws \common_Exception