         
         let count2 = dbHelper.countForEntity("TestItem")
         XCTAssertEqual(count2, 3)
+    }
+    
+    func testFetchEntityInBack() {
+        insertOneItem()
+        
+        let expectation = expectationWithDescription("Test Fetch Entity In Back")
+        
+        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
+            let items: [TestItem]? = self.dbHelper.fetchEntity(self.entityName)
+            XCTAssertNotNil(items)
+            XCTAssertTrue(items!.count != 0)
+            
+            expectation.fulfill()
+        }
+        
+        waitForExpectationsWithTimeout(2) { (error) in
+            if let error = error {
+                print("wait error: \(error.localizedDescription)")
+            }
+        }
     }
     
     func testFetchEntityConcurrent() {

        dbHelper.removeAllEntity("TestItem")
    }
    
    func testRemoveAllEntityConcurrent() {
        for _ in 0..<3 {
            insertOneItem()

        XCTAssertEqual(count2, 0)
    }
    
    func testCountForEntityInBack() {
        insertOneItem()
        
        let expectation = expectationWithDescription("testCountForEntityInBack")
        
        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
            let count = self.dbHelper.countForEntity(self.entityName)
            XCTAssertNotNil(count)
            XCTAssertEqual(count!, 1)
            expectation.fulfill()
        }

        waitForExpectationsWithTimeout(2) { (error) in
            if let error = error {
                print("Error: \(error.localizedDescription)")
            }
        }
    }
    
    func testCountForEntityConcurrent() {
        insertOneItem()
        
