public function testInvalidLifeCycleType()
 {
     $lifeCycle = new LifeCycleModel($this->_data);
     $result = $this->_validator->isValid($lifeCycle->getId());
     $this->assertFalse($result);
     $messages = $this->_validator->getMessages();
     $this->assertArrayHasKey(App_Validate_Ericsson_LifeCycleExistsById::ERROR_INVALID_TYPE, $messages);
 }
 protected function _updateEricsson(Model\LifeCycleModel $lifeCycle)
 {
     $methodName = self::METHOD_NAME_UPDATE;
     try {
         $proto = $this->_createProto($methodName);
         $mappedData = $this->_mapModelToEricssonModel($lifeCycle->exportData());
         $proto->parse($mappedData, new \DrSlump\Protobuf\Codec\PhpArray());
         $proto->setId($mappedData['id']);
         $response = $this->_sendRequest($methodName, array('protoMessage' => $proto));
     } catch (Exception $e) {
         \App::log()->CRIT($e);
     }
     $this->_checkPostResponse($response);
     //The request has gone ok, but there is a reason code, so we will return a 304
     if ($response->getResult()->getCode() == 0 && $response->getResult()->getReasonCode()) {
         $data = array('reason' => $response->getResult()->getReason(), 'code' => $response->getResult()->getReasonCode() ?: $response->getResult()->getCode());
         throw new EricssonException($response->getResult()->getReason(), $data, null, 304);
     }
     $lifeCycle->setId($mappedData['id']);
     return $lifeCycle->getId();
 }