         }
         
         imageController.fetchImageWithURL(testURL, failure:failure, success: success)
-        
-        waitForExpectations(timeout: WMFDefaultExpectationTimeout) { (error) in
-        }
         
         NotificationCenter.default.removeObserver(observationToken)
         

        
        URLProtocol.registerClass(WMFHTTPHangingProtocol.self)
        
        let expectation = self.expectation(description: "wait for image cancellation");
        
        let failure = { (error: Error) in
            let error = error as NSError
            XCTAssert(error.code == NSURLErrorCancelled)
            expectation.fulfill()
        }
        
        let success = { (imgDownload: WMFImageDownload) in
            XCTFail()
            expectation.fulfill()
        }
        
        let observationToken =

            // XCTAssertEqual(failingURL, testURL)
            XCTAssertEqual(error.code, stubbedError.code)
            XCTAssertEqual(error.domain, stubbedError.domain)
            expectation.fulfill()
        }
        
