             } else {
                 XCTFail("Can't retrieve 'name' key of object");
             }
-            XCTAssertNotNil(data["_id"].string, "Object must have an Id")
+            XCTAssertNotNil(data["_id"].int, "Object must have an Id")
             
             expectation.fulfill()
         }).onError({ (data) in

        }
    }
    
    func testObjectCounting() {
        var expectation = expectationWithDescription("create")
        
        hook?.collection("items").create([ "type": "toCount" ]).onSuccess{ (data) in
            if (data != nil) {
                self.hook?.collection("items").count().onSuccess{ (data) in
                    XCTAssertNotNil(data.int, "Count must return something");
                    expectation.fulfill()
                }
            } else {
                XCTFail("Can't create test item")
            }
            
        }
        
        // Expectation timeout
        waitForExpectationsWithTimeout(10) { (error) in

    }
    
    func testObjectDeletion() {
        var expectation = expectationWithDescription("delete")
        
        hook?.collection("items").create([
            "type": "toDelete"
