         it "Then { _id: '987' } should be returned", ->
             @body.should.have.property '_id', '987'
 
+        it "Then the Document with id 987 should exist in Database", (done) ->
+            client.get "data/exist/987/", (error, response, body) =>
+                @body = parseBody response, body
+                @body.exist.should.be.true
+                done()
+
+        it "Then the Document in DB should equal the sent Document", (done) ->
+            client.get "data/987/", (error, response, body) =>
+                @body = parseBody response, body
+                @body.should.have.property 'value', @randomValue
+                done()
+
     describe "Create a new Document without an id", ->
         before cleanRequest
+        after ->
+            delete @randomValue
+            delete @_id
 
         it "When I send a request to create a document without an id", (done) ->
-            client.post 'data/', {"value":"created value"}, \
+            @randomValue = randomString()
+            client.post 'data/', {"value":@randomValue}, \
                         (error, response, body) =>
                 response.statusCode.should.equal(201)
                 @body = parseBody response, body


parseBody = (response, body) ->
    if typeof body is "object" then body else JSON.parse body

# Clear DB, create a new one, then init data for tests.
before (done) ->


    describe "Create a new Document with a given id", ->
        before cleanRequest
        after ->
            delete @randomValue

        it "When I send a request to create a document with id 987", (done) ->
            @randomValue = randomString()
            client.post 'data/987/', {"value":@randomValue}, \
                        (error, response, body) =>
                response.statusCode.should.equal 201
                @body = parseBody response, body
