             XCTAssertNotNil(dummy)
             dummyCounter+=1
         }.wait()
-        XCTAssertEqual(dummyCounter, 7)
+        XCTAssertEqual(dummyCounter, dummyAccounts.count)
     }
     
     func testUpdateDummyAccounts () throws {
-        try _ = testBulkCreateDummyAccounts()
-        if var dummy = try readDummyAccount(name: "Them") {
-
+        let testDummyAccounts = try testBulkCreateDummyAccounts()
+        let testDummyAccount = testDummyAccounts[Int.random(in: 0...testDummyAccounts.count)]
+
+        if var account = try readDummyAccount(name: testDummyAccount.name) {
             let schema: MongoCollection = mongo[DummyAccount.collectionName]
-            dummy.name = "UpdateTest"
-
-            _ = try schema.updateEncoded(where: "_id" == dummy._id, to: dummy).wait()
-            let updatedDummy: DummyAccount? = try readDummyAccount(name: "UpdateTest")
-
-            XCTAssertNotNil(updatedDummy)
-            XCTAssertEqual(updatedDummy?._id, dummy._id)
+
+            account.name = "UpdateTest"
+
+            _ = try schema.updateEncoded(where: "_id" == account._id, to: account).wait()
+            let updatedAccount: DummyAccount? = try readDummyAccount(name: "UpdateTest")
+
+            XCTAssertNotNil(updatedAccount)
+            XCTAssertEqual(updatedAccount?._id, account._id)
         } else {
             XCTFail("Retrieved a nil value")
         }

        }
    }


}

        XCTAssertEqual(reply.writeErrors?[0].code, 11000)
    }

    // TODO: SequentialForEach
    // func testCursorLoop () throws {
    //     let dummyAccounts = try testBulkCreateDummyAccounts()
    //     let schema: MongoCollection = mongo[DummyAccount.collectionName]
    //     let bla = try schema.find().sequentialForEach{}
    // }
    
    func testGridFSInsert () throws {
        let file = Data(repeating: 0x50, count: 2_000_000)
