 
         _ = api.searchForPhotos(takenAfter: expectedDate)
 
-        let actualQueryItems = queryItems(for: mock.lastURL)
+        let actualQueryItems = queryItems(for: mockSession.lastURL)
         XCTAssertTrue(
             actualQueryItems?.contains(expectedItem) ?? false,
             "\(expectedItem) not found in "

    }

    func testCall_PassesAPIKeyParameter() {
        let mock = MockURLSession()
        let api = FlickrAPI(
            withAPIKey: "dummy-api-key",
            withURLSession: mock
        )
        let expectedItem = URLQueryItem(
            name: "api_key",
            value: "dummy-api-key"


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

        let actualQueryItems = queryItems(for: mockSession.lastURL)
        for (name, value) in expectedItems {
            let expectedItem = URLQueryItem(
                name: name,
