public function testCreateDocument()
{
$user = $this->uow->createDocument($this->type, array('_id' => '1', '_rev' => 23, 'username' => 'foo', 'type' => $this->type));
$this->assertInstanceOf($this->type, $user);
$this->assertEquals('1', $user->id);
$this->assertEquals('foo', $user->username);
$this->assertEquals(UnitOfWork::STATE_MANAGED, $this->uow->getDocumentState($user));
$this->assertEquals(1, $this->uow->getDocumentIdentifier($user));
$this->assertEquals(23, $this->uow->getDocumentRevision($user));
$this->assertEquals(array('id' => '1', 'username' => 'foo'), $this->uow->getOriginalData($user));
}