             XCTAssertEqual(2, realm.objects(SwiftObject).count)
         }
         XCTAssertEqual(2, realm.objects(SwiftObject).count)
+
+        let testRealm = realmWithTestPath()
+        testRealm.write {
+            self.assertThrows(testRealm.add(realm.objects(SwiftObject)))
+        }
     }
 
     func testAddOrUpdateSingleObject() {
         let realm = Realm()
         XCTAssertEqual(0, realm.objects(SwiftPrimaryStringObject).count)
-        realm.write {
-            let obj = SwiftPrimaryStringObject()
-            realm.addOrUpdate(obj)
+        var defaultRealmObject: SwiftPrimaryStringObject!
+        realm.write {
+            defaultRealmObject = SwiftPrimaryStringObject()
+            realm.addOrUpdate(defaultRealmObject)
             XCTAssertEqual(1, realm.objects(SwiftPrimaryStringObject).count)
+            realm.addOrUpdate(SwiftPrimaryStringObject())
+            XCTAssertEqual(1, realm.objects(SwiftPrimaryStringObject).count)
         }
         XCTAssertEqual(1, realm.objects(SwiftPrimaryStringObject).count)
+
+        let testRealm = realmWithTestPath()
+        testRealm.write {
+            self.assertThrows(testRealm.addOrUpdate(defaultRealmObject))
+        }
     }
 
     func testAddOrUpdateMultipleObjects() {

            XCTAssertEqual(1, realm.objects(SwiftPrimaryStringObject).count)
        }
        XCTAssertEqual(1, realm.objects(SwiftPrimaryStringObject).count)
    }

    func testDeleteSingleObject() {
        let realm = Realm()
        XCTAssertEqual(0, realm.objects(SwiftObject).count)
        realm.write {
            let obj = SwiftObject()
            realm.add(obj)
            XCTAssertEqual(1, realm.objects(SwiftObject).count)
            realm.delete(obj)
            XCTAssertEqual(0, realm.objects(SwiftObject).count)
        }
        XCTAssertEqual(0, realm.objects(SwiftObject).count)
    }

    func testDeleteListOfObjects() {

    func testDeleteSequenceOfObjects() {
        let realm = Realm()
        XCTAssertEqual(0, realm.objects(SwiftObject).count)
        var objs: [SwiftObject]!
        realm.write {
            objs = [SwiftObject(), SwiftObject()]
            realm.add(objs)
            XCTAssertEqual(2, realm.objects(SwiftObject).count)
            realm.delete(objs)
            XCTAssertEqual(0, realm.objects(SwiftObject).count)
        }
        XCTAssertEqual(0, realm.objects(SwiftObject).count)

        let testRealm = realmWithTestPath()
        assertThrows(testRealm.delete(objs))
        testRealm.write {
            self.assertThrows(testRealm.delete(objs))
        }
    }

    func testDeleteAll() {
