public function testPageId()
 {
     $item = new PageState();
     $pageId = 'SomeId';
     $item->setPageId($pageId);
     $this->assertEquals($pageId, $item->getPageId());
     $this->assertEquals(PageState::generateHash($pageId), $item->getPageHash());
 }
 /**
  * Check if page id already exists
  *
  * @QueryParam(name="pageId", nullable=false, description="Unique page id")
  *
  * @ApiDoc(
  *  description="Check if page id already exists",
  *  resource=true
  * )
  */
 public function getCheckidAction()
 {
     $entity = $this->getDoctrine()->getRepository('OroNavigationBundle:PageState')->findOneByPageHash(PageState::generateHash($this->getRequest()->get('pageId')));
     return $this->handleView($this->view($this->getState($entity), Codes::HTTP_OK));
 }