public function testInvalidRestrictionsType()
 {
     $restrictions = new RestrictionModel($this->_data);
     $result = $this->_validator->isValid($restrictions->getId());
     $this->assertFalse($result);
     $messages = $this->_validator->getMessages();
     $this->assertArrayHasKey(App_Validate_Ericsson_RestrictionsExistsById::ERROR_INVALID_TYPE, $messages);
 }
 protected function _updateEricsson(Model\RestrictionModel $restrictions)
 {
     $methodName = self::METHOD_NAME_UPDATE;
     try {
         $proto = $this->_createProto($methodName);
         $createData = new Restrictions\RestrictionsData();
         $proto->setData($createData);
         $mappedData = $this->_mapModelToEricssonModel($restrictions->exportData());
         $createData->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);
     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);
     }
     $restrictions->setId($mappedData['id']);
     return $restrictions->getId();
 }