     }
 
     func testPhotoSearch_GivenFlickrSearchResultsReturnsPhotos() {
-        let mock = MockURLSession()
-        let api = FlickrAPI(
-            withAPIKey: "dummy-api-key",
-            withURLSession: mock
-        )
-
-        mock.nextData = (
+        mockSession.nextData = (
             "{" +
                 "\"photos\": {" +
                     "\"photo\": [{" +


        _ = api.call(method: "dummy-method")

        let actualQueryItems = queryItems(for: mock.lastURL)
        XCTAssertTrue(
            actualQueryItems?.contains(expectedItem) ?? false,
            "\(expectedItem) not found in "

    }

    func testPhotoSearch_PassesTakenBeforeParameter() {
        let expectedDate = Date(timeIntervalSince1970: 0)
        let expectedItem = URLQueryItem(
            name: "max_taken_date",
