     }
 
     func testCall_PassesParameters() {
-        let mock = MockURLSession()
-        let api = FlickrAPI(
-            withAPIKey: "dummy-api-key",
-            withURLSession: mock
-        )
         let expectedItems = [
             "first-parameter": "first-value",
             "second-parameter": "second-value"


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

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

@testable import PhotosMetadataFixerFramework

class FlickrAPITests: XCTestCase {
    var mockSession: MockURLSession!
    var api: FlickrAPI!

    override func setUp() {
        super.setUp()

        mockSession = MockURLSession()
        api = FlickrAPI(
            withAPIKey: "dummy-api-key",
            withURLSession: mockSession
        )
    }

    func queryItems(for url: URL?) -> [URLQueryItem]? {
        // Pass the querystring through URLComponents so we don't
        // have to manually parse it
