     }
     
     
+    // MARK: - Tests - controllerWillChangeContent
+    
     func test_controllerWillChangeContent_mustNotCrash() {
         let dataSource = self.createTableViewFetcherDataSource(sectionNameKeyPath: nil)
         self.tableView.dataSource = dataSource

        let tableViewCellNib = UINib(nibName: "TableViewCell", bundle: NSBundle(forClass: self.dynamicType))
        self.tableView.registerNib(tableViewCellNib, forCellReuseIdentifier: "TableViewCell")
        self.tableView.dataSource = dataSource

        EntitySyncHistory.removeAll(inManagedObjectContext: self.managedObjectContext)

        let ruleName = TestUtil().randomRuleName()
        let entityRule = EntitySyncHistory.entityAutoSyncHistoryByName(ruleName,
            lastExecutionDate: nil,
            inManagedObjectContext: self.managedObjectContext)
        
        let ruleName2 = TestUtil().randomRuleName()
        EntitySyncHistory.entityAutoSyncHistoryByName(ruleName2,
            lastExecutionDate: nil,
            inManagedObjectContext: self.managedObjectContext)

        do {
            try dataSource.refreshData()
            XCTAssertTrue(true)
        } catch {
            XCTAssertTrue(false)
        }

        self.tableView.beginUpdates()
        dataSource.controller(dataSource.fetchedResultsController,
            didChangeObject: entityRule!,
            atIndexPath: NSIndexPath(forRow: 0, inSection: 0),
            forChangeType: .Move,
            newIndexPath: NSIndexPath(forRow: 1, inSection: 0))
        self.tableView.endUpdates()
    }
    
    func test_controllerDidChangeContent_mustNotCrash() {
        let dataSource = self.createTableViewFetcherDataSource(sectionNameKeyPath: nil)
        dataSource.controllerDidChangeContent(dataSource.fetchedResultsController)

        }
    }
    

    // MARK: - Tests - numberOfSections
    
    func test_numberOfSections_mustReturnZero() {
        let dataSource = self.createTableViewFetcherDataSource(sectionNameKeyPath: "sectionName")
        EntityTest.removeAll(inManagedObjectContext: self.managedObjectContext)
        self.coreDataStack.saveContext()
        let numberOfSections = dataSource.numberOfSectionsInTableView(self.tableView)
        XCTAssertEqual(numberOfSections, 0)
