 class CacheTests: XCTestCase {
   
   private let helper = TestHelper()
-  
-  private var cache: Cache!
-  private var namedCache: Cache?
 
   override func tearDown() {
     super.tearDown()


  func testItReturnsExpiredFileUrlsForDeletion() {
    let expectation = self.expectation(description: "Expired Urls")
    cache = Cache(name: #function)
    cache.maxCacheAgeSeconds = 0
    let image = helper.image
    let key = #function

    cache.store(image, forKey: key) { [cache] in
      let urls = cache!.expiredFileUrls()
      XCTAssertFalse(urls.isEmpty)
      expectation.fulfill()
    }


  func testCacheWithIdentifierIsCachedAsSeparateImage() {
    let expectation = self.expectation(description: "Retrieve image from cache")
    let cache = Cache.default
    let image = helper.image
    let alternateImage = UIImage(data: image.jpegData(compressionQuality: 0.2)!)!
    let key = #function
    let transformerId = "transformer"

    cache.store(image, forKey: key) {
      cache.store(alternateImage, forKey: key, transformerId: transformerId) {
        cache.retrieveImage(forKey: key) { image, _ in
          cache.retrieveImage(forKey: key, transformerId: transformerId) { transformerImage, _ in
            XCTAssertNotNil(image)
            XCTAssertNotNil(transformerImage)
            XCTAssertNotEqual(image, transformerImage)
