     }
 
     func testLoginSucceedsThenSearchFailsDoesNotNotifyHandlerOfSuccess() {
-        var controllableNetworkAdapter = ControllableNetworkAdapter()
-        controllableNetworkAdapter.stub(url: URL(string: "https://inkbunny.net/api_login.php")!, withContentsOfJSONFile: "ValidInkbunnyGuestLoginResponse")
-        controllableNetworkAdapter.stubFailure(url: URL(string: "https://inkbunny.net/api_search.php?sid=This_Is_A_Test_Token")!)
+        let controllableNetworkAdapter = makeFailingSearchNetworkAdapter()
         let inkbunnyAPI = InkbunnyAPI(networkAdapter: controllableNetworkAdapter)
         let capturingHomepageHandler = CapturingInkbunnyHomepageHandler()
         inkbunnyAPI.loadHomepage(completionHandler: capturingHomepageHandler.verify)


    func testSearchSucceedsProvidesHandlerWithItemConfiguredWithSubmissionID() {
        let firstSubmissionIDInSearchJSON = "1359474"
        var controllableNetworkAdapter = ControllableNetworkAdapter()
        controllableNetworkAdapter.stub(url: URL(string: "https://inkbunny.net/api_login.php")!, withContentsOfJSONFile: "ValidInkbunnyGuestLoginResponse")
        controllableNetworkAdapter.stub(url: URL(string: "https://inkbunny.net/api_search.php?sid=This_Is_A_Test_Token")!, withContentsOfJSONFile: "ValidInkbunnySearchResponse")

        let inkbunnyAPI = InkbunnyAPI(networkAdapter: controllableNetworkAdapter)
        let capturingHomepageHandler = CapturingInkbunnyHomepageHandler()
        inkbunnyAPI.loadHomepage(completionHandler: capturingHomepageHandler.verify)


    }

    func testSearchSucceedsWithInvalidJSONAfterGuestLoginSucceedsNotifiesHandlerOfFailure() {
        let failingSearchNetworkAdapter = makeFailingSearchNetworkAdapter()
        let inkbunnyAPI = InkbunnyAPI(networkAdapter: failingSearchNetworkAdapter)
        let capturingHomepageHandler = CapturingInkbunnyHomepageHandler()
        inkbunnyAPI.loadHomepage(completionHandler: capturingHomepageHandler.verify)

