 import CoreData
 import York
 
-class FetcherDataSourceTests: XCTestCase {
-
-    var entityName: String!
-    var predicate: NSPredicate?
-    var fetchLimit: NSInteger?
-    var sortDescriptors: [NSSortDescriptor]!
-    var sectionNameKeyPath: String?
-    var cacheName: String?
-    var coreDataStack: CoreDataStack!
-    var managedObjectContext:NSManagedObjectContext!
-    var logger:Logger!
+class FetcherDataSourceTests: BaseFetcherDataSourceTests {
+
+    
+    // MARK: - Supporting Methods
     
     func createFetcherDataSourceConvenienceInitializer() -> FetcherDataSource<EntityTest> {
         self.entityName = EntityTest.simpleClassName()
         self.sortDescriptors = []
-        self.coreDataStack = TestUtil().appContext().coreDataStack
+        self.coreDataStack = TestUtil().testAppContext().coreDataStack
         self.managedObjectContext = self.coreDataStack.managedObjectContext
         self.logger = Logger()
         self.predicate = nil

        XCTAssertEqual(dataSource.logger, self.logger)
    }
    
}

    func createFetcherDataSourceDesignatedInitializer() -> FetcherDataSource<EntityTest> {
        self.entityName = EntityTest.simpleClassName()
        self.sortDescriptors = []
        self.coreDataStack = TestUtil().testAppContext().coreDataStack
        self.managedObjectContext = self.coreDataStack.managedObjectContext
        self.logger = Logger()
        self.predicate = nil
        self.fetchLimit = 100
        self.sectionNameKeyPath = nil
        self.cacheName = "cacheName"
        
        let dataSource = FetcherDataSource<EntityTest>(entityName: self.entityName,
