/**
  * test entity
  *
  * @return void
  */
 public function testEntity()
 {
     $entity = new DocumentEntity(['id' => 'id', 'content' => 'content', 'instanceId' => 'instanceId', 'writer' => 'writer', 'userId' => 'userId']);
     $this->assertEquals('id', $entity->getUid());
     $this->assertEquals('instanceId', $entity->getInstanceId());
     $this->assertEquals(DocumentEntity::CONTENT_HTML, $entity->getContentMode());
     $this->assertEquals('content', $entity->content());
     $entity->setContentMode(DocumentEntity::CONTENT_NO_HTML);
     $this->assertEquals(DocumentEntity::CONTENT_NO_HTML, $entity->getContentMode());
     $this->assertEquals('content', $entity->content());
     $this->assertEquals('content', $entity->content(DocumentEntity::CONTENT_HTML));
     $entity->setUserType(DocumentEntity::USER_TYPE_ANONYMITY);
     $entity->setUserType(DocumentEntity::USER_TYPE_GUEST);
     $entity->setUserType(DocumentEntity::USER_TYPE_USER);
     $this->assertFalse($entity->isGuest());
     $entity->setUserType(DocumentEntity::USER_TYPE_GUEST);
     $this->assertTrue($entity->isGuest());
     $this->assertEquals('writer', $entity->getWriter());
     $this->assertEquals('userId', $entity->getUserId());
 }