                 XCTAssert(self.imageView.image! == testImage, "Downloaded image should be already set to the image property.")
                 XCTAssert(self.imageView.kf_webURL == imageURL, "Web URL should equal to the downloaded url.")
                 
-                XCTAssert(cacheType == .None, "The cache type should be none here. This image was just downloaded.")
+                XCTAssert(cacheType == .None, "The cache type should be none here. This image was just downloaded. But now is: \(cacheType)")
         }
         
         waitForExpectationsWithTimeout(5, handler: nil)

        
        var progressBlockIsCalled = false
        
        imageView.kf_setImageWithResource(resource, placeholderImage: nil, optionsInfo: nil, progressBlock: { (receivedSize, totalSize) -> () in
            progressBlockIsCalled = true
            }) { (image, error, cacheType, imageURL) -> () in

        
        waitForExpectationsWithTimeout(5, handler: nil)
    }
    
    func testDownloadForMutipleURLs() {
        let expectation = expectationWithDescription("wait for downloading image")
        
        let URLStrings = [testKeys[0], testKeys[1]]
        stubRequest("GET", URLStrings[0]).andReturn(200).withBody(testImageData)
        stubRequest("GET", URLStrings[1]).andReturn(200).withBody(testImageData)
        let URLs = URLStrings.map{NSURL(string: $0)!}
        
        var task1Complete = false
        var task2Complete = false
        
        imageView.kf_setImageWithURL(URLs[0], placeholderImage: nil, optionsInfo: nil, progressBlock: { (receivedSize, totalSize) -> () in
            
            }) { (image, error, cacheType, imageURL) -> () in
                task1Complete = true
                XCTAssertNotNil(image)
                XCTAssertEqual(imageURL, URLs[0])
                XCTAssertNotEqual(self.imageView.image, image)
        }
        
        self.imageView.kf_setImageWithURL(URLs[1], placeholderImage: nil, optionsInfo: nil, progressBlock: { (receivedSize, totalSize) -> () in
            
            }) { (image, error, cacheType, imageURL) -> () in
                task2Complete = true
                XCTAssertNotNil(image)
                XCTAssertEqual(imageURL, URLs[1])
                XCTAssertEqual(self.imageView.image, image)
        }
        
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(Double(NSEC_PER_SEC) * 0.1)), dispatch_get_main_queue()) { () -> Void in
            XCTAssertTrue(task1Complete, "Task 1 should be completed.")
            XCTAssertTrue(task2Complete, "Task 2 should be completed.")

            expectation.fulfill()
        }
        
        waitForExpectationsWithTimeout(5, handler: nil)
    }
}
