      */
     @objc public func newBackgroundContext() -> NSManagedObjectContext {
         let context = NSManagedObjectContext(concurrencyType: DataStack.backgroundConcurrencyType())
+        context.name = backgroundContextName
         context.persistentStoreCoordinator = self.persistentStoreCoordinator
         context.undoManager = nil
         context.mergePolicy = NSMergeByPropertyStoreTrumpMergePolicy


    // Can't be private, has to be internal in order to be used as a selector.
    @objc func backgroundContextDidSave(_ notification: Notification) throws {
        if Thread.isMainThread && TestCheck.isTesting == false {
            throw NSError(info: "Background context saved in the main thread. Use context's `performBlock`", previousError: nil)
        } else {

    private var model: NSManagedObjectModel

    private var containerURL = URL.directoryURL()

    private let backgroundContextName = "DataStack.backgroundContextName"

    /**
     The context for the main queue. Please do not use this to mutate data, use `performInNewBackgroundContext`
