         let json = try! JSONSerialization.data(withJSONObject: unexpectedStructure, options: .prettyPrinted)
         let unexpectedJSONAdapter = SuccessfulNetworkAdapter(data: json)
         let capturingHomepageFeedDelegate = CapturingHomepageFeedDelegate()
+        let feed = WeasylHomepageFeed()
         feed.loadFeed(networkAdapter: unexpectedJSONAdapter, delegate: capturingHomepageFeedDelegate)
 
         XCTAssertTrue(capturingHomepageFeedDelegate.wasNotifiedFeedDidFailToLoad)

    func testTheDelegateIsNotToldAboutFeedLoadsWhenNetworkErrors() {
        let successfulNetworkAdapter = FailingNetworkAdapter()
        let capturingHomepageFeedDelegate = CapturingHomepageFeedDelegate()
        feed.loadFeed(networkAdapter: successfulNetworkAdapter, delegate: capturingHomepageFeedDelegate)

        XCTAssertFalse(capturingHomepageFeedDelegate.wasNotifiedDidFinishLoading)

    func testTheDelegateIsNotToldAboutFeedErrorsWhenNetworkSucceeds() {
        let blockedNetworkAdapter = SuccessfulNetworkAdapter(contentsOfJSONFile: "ValidWeasylHomepageResponse")
        let capturingHomepageFeedDelegate = CapturingHomepageFeedDelegate()
        let feed = WeasylHomepageFeed()
        feed.loadFeed(networkAdapter: blockedNetworkAdapter, delegate: capturingHomepageFeedDelegate)

        XCTAssertFalse(capturingHomepageFeedDelegate.wasNotifiedFeedDidFailToLoad)
