 
     // MARK: Insertions
 
-    func insertBulkRecords(){
+    func insertBulkRecords(context:NSManagedObjectContext){
 
         let entity =  NSEntityDescription.entityForName("Person",
-            inManagedObjectContext:self.managedObjectContext)
+            inManagedObjectContext:context)
 
         let birthdate:NSDate = NSDate()
         for i in 0...Constants.maxNumberOfEntities{
 
             let person:NSManagedObject = NSManagedObject(
                 entity: entity!,
-                insertIntoManagedObjectContext: self.managedObjectContext)
+                insertIntoManagedObjectContext: context)
 
             person.setValue("random name #\(i)", forKey: "name")
             person.setValue(i, forKey: "personId")

        }

        do {
            try self.managedObjectContext.save()
            print("cd.Persisted 1M objects")

        } catch let error as NSError  {

        super.setUp()
        self.setUpInMemoryManagedObjectContext()

        self.insertBulkRecords(self.managedObjectContext)
        print("cd.Setup CD stack")
    }

