         }
     }
     
-    
-    func test_objectAtIndexPath_mustReturnEntity() {
-        let dataSource = self.createTableViewFetcherDataSource(sectionNameKeyPath: nil)
-        EntitySyncHistory.removeAll(inManagedObjectContext: self.managedObjectContext)
-        EntitySyncHistory.entityAutoSyncHistoryByName("rule-test-name",
-            lastExecutionDate: nil,
-            inManagedObjectContext: self.managedObjectContext)
-        self.coreDataStack.saveContext()
-        do {
-            try dataSource.refreshData()
-            XCTAssertTrue(true)
-        } catch {
-            XCTAssertTrue(false)
-        }
-
-        let object = dataSource.objectAtIndexPath(NSIndexPath(forRow: 0, inSection: 0))
-        XCTAssertNotNil(object)
-    }
-    
-    
-    func test_indexPathForObject_mustReturnObject() {
-        let dataSource = self.createTableViewFetcherDataSource(sectionNameKeyPath: nil)
-        EntitySyncHistory.removeAll(inManagedObjectContext: self.managedObjectContext)
-        let entity = EntitySyncHistory.entityAutoSyncHistoryByName("rule-test-name",
-            lastExecutionDate: nil,
-            inManagedObjectContext: self.managedObjectContext)
-        self.coreDataStack.saveContext()
-        do {
-            try dataSource.refreshData()
-            XCTAssertTrue(true)
-        } catch {
-            XCTAssertTrue(false)
-        }
-
-        let indexPath = dataSource.indexPathForObject(entity!)
-        XCTAssertNotNil(indexPath)
-    }
-    
-    func test_indexPathForObject_mustReturnNil() {
-        let dataSource = self.createTableViewFetcherDataSource(sectionNameKeyPath: nil)
-        EntitySyncHistory.removeAll(inManagedObjectContext: self.managedObjectContext)
-        let entity = EntitySyncHistory.entityAutoSyncHistoryByName("rule-test-name",
-            lastExecutionDate: nil,
-            inManagedObjectContext: self.managedObjectContext)
-        self.coreDataStack.saveContext()
-        do {
-            try dataSource.refreshData()
-            XCTAssertTrue(true)
-        } catch {
-            XCTAssertTrue(false)
-        }
-
-        let indexPath = dataSource.indexPathForObject(entity!)
-        XCTAssertNotNil(indexPath)
-    }
-    
+
+    // MARK: - Tests - numberOfSections
     
     func test_numberOfSections_mustReturnZero() {
-        let dataSource = self.createTableViewFetcherDataSource(sectionNameKeyPath: "ruleName")
-        EntitySyncHistory.removeAll(inManagedObjectContext: self.managedObjectContext)
+        let dataSource = self.createTableViewFetcherDataSource(sectionNameKeyPath: "sectionName")
+        EntityTest.removeAll(inManagedObjectContext: self.managedObjectContext)
         self.coreDataStack.saveContext()
         let numberOfSections = dataSource.numberOfSectionsInTableView(self.tableView)
         XCTAssertEqual(numberOfSections, 0)

        tableView.cellForRowAtIndexPathBlock = { () -> UITableViewCell? in
            return TableViewCell()
        }
        let dataSource = createTableViewFetcherDataSource(sectionNameKeyPath: nil, tableView: tableView)
        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()
        EntitySyncHistory.entityAutoSyncHistoryByName(ruleName,
            lastExecutionDate: nil,
            inManagedObjectContext: self.managedObjectContext)

        let ruleName2 = TestUtil().randomRuleName()
        let entityRule = 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: 1, inSection: 0),
            forChangeType: .Update,
            newIndexPath: nil)

        XCTAssertEqual(numberOfRows, 1)
    }
    
//    func test_cellForRowAtIndexPath_mustReturnCell() {
//        let dataSource = self.createTableViewFetcherDataSource(sectionNameKeyPath: nil)
//        dataSource.sortDescriptors = [ NSSortDescriptor(key: "order", ascending: true) ]
//        self.removeAllTestEntities()
//        
//        self.createTestEntity(nil, name: "EntityTest-0", order: 0)
//        self.createTestEntity(nil, name: "EntityTest-1", order: 1)
//        self.coreDataStack.saveContext()
//        do {
//            try dataSource.refreshData()
//            XCTAssertTrue(true)
//        } catch {
//            XCTAssertTrue(false)
//        }
//        
//        tableView.reloadData()
//        
//        let indexPath = NSIndexPath(forRow: 0, inSection: 0)
//        let cell = dataSource.tableView(tableView, cellForRowAtIndexPath: indexPath)
//        XCTAssertNotNil(cell)
//    }
    
    
    // MARK: - Tests - canEditRowAtIndexPath
    
    func test_canEditRowAtIndexPath_withBlock_mustSucceed() {
        let dataSource = self.createTableViewFetcherDataSource(sectionNameKeyPath: nil)
