         // Create a token
         let token = testToken
 
-        do {
-            // Save the token
-            let savedToken = try keychain.addToken(token)
+        // Save the token
+        let savedToken: PersistentToken
+        do {
+            savedToken = try keychain.addToken(token)
+        } catch {
+            XCTFail("addToken(_:) failed with error: \(error)")
+            return
+        }
 
             // Restore the token
             do {

            } catch {
                XCTFail("allPersistentTokens() failed with error: \(error)")
            }
        } catch {
            XCTFail("addToken(_:) failed with error: \(error)")
        }
    }
}


        let token1 = testToken, token2 = testToken

        // Add both tokens to the keychain
        let savedItem1: PersistentToken
        let savedItem2: PersistentToken
        do {
            savedItem1 = try keychain.addToken(token1)
            savedItem2 = try keychain.addToken(token2)
            XCTAssertEqual(savedItem1.token, token1)
            XCTAssertEqual(savedItem2.token, token2)
        } catch {
            XCTFail("addToken(_:) failed with error: \(error)")
            return
        }

            // Fetch both tokens from the keychain
            do {
