         })
         waitForExpectations(timeout: 5, handler: nil)
     }
-    
+
     func testSucessCompletionHandlerRunningOnCustomQueue() {
         let progressExpectation = expectation(description: "progressBlock running on custom queue")
         let completionExpectation = expectation(description: "completionHandler running on custom queue")

                if #available(iOS 10.0, tvOS 10.0, macOS 10.12, *) {
                    dispatchPrecondition(condition: .onQueue(customQueue))
                }
                expectation.fulfill()
        })
        waitForExpectations(timeout: 5, handler: nil)
    }
    
    func testDefaultOptionCouldApply() {
        let expectation = self.expectation(description: "running on custom queue")
        let URLString = testKeys[0]
        _ = stubRequest("GET", URLString).andReturn(200)?.withBody(testImageData)
        

    
    func testOriginalImageCouldBeStored() {
        let expectation = self.expectation(description: "waiting for cache finished")

        let URLString = testKeys[0]
        _ = stubRequest("GET", URLString).andReturn(200)?.withBody(testImageData)
        let url = URL(string: URLString)!

        let p = SimpleProcessor()
        let options: KingfisherOptionsInfo = [.processor(p), .cacheOriginalImage]
        self.manager.downloadAndCacheImage(with: url, forKey: URLString, retrieveImageTask: RetrieveImageTask(), progressBlock: nil, completionHandler: {
            (image, error, cacheType, url) in
            delay(0.1) {
                var imageCached = self.manager.cache.imageCachedType(forKey: URLString, processorIdentifier: p.identifier)
                var originalCached = self.manager.cache.imageCachedType(forKey: URLString)

                XCTAssertEqual(imageCached, .memory)
                XCTAssertEqual(originalCached, .memory)

                self.manager.cache.clearMemoryCache()

                imageCached = self.manager.cache.imageCachedType(forKey: URLString, processorIdentifier: p.identifier)
                originalCached = self.manager.cache.imageCachedType(forKey: URLString)
                XCTAssertEqual(imageCached, .disk)
                XCTAssertEqual(originalCached, .disk)

                expectation.fulfill()
            }
        }, options: options)

        self.waitForExpectations(timeout: 5, handler: nil)
    }
    
