     }
 
     func testDuplicateURLs() {
-        guard let token1 = Token.URLSerializer.deserialize(kValidTokenURL),
-            let token2 = Token.URLSerializer.deserialize(kValidTokenURL) else {
-                XCTFail("Failed to construct tokens from url.")
-                return
-        }
+        let token1 = kToken, token2 = kToken
 
         // Add both tokens to the keychain
         guard let savedItem1 = try? keychain.addToken(token1) else {

            // The deletion should throw and this line should never be reached.
            XCTFail("Removing again should fail: \(token1)")
        } catch {
            // This is the expected outcome
            // TODO: Assert the expected error type
        }
        do {
            try keychain.deletePersistentToken(savedItem2)
            // The deletion should throw and this line should never be reached.
            XCTFail("Removing again should fail: \(token2)")
        } catch {
            // This is the expected outcome
            // TODO: Assert the expected error type
        }
    }

    func testAllTokensInKeychain() {
        guard let token1 = Token.URLSerializer.deserialize(kValidTokenURL),
            let token2 = Token.URLSerializer.deserialize(kValidTokenURL),
            let token3 = Token.URLSerializer.deserialize(kValidTokenURL) else {
                XCTFail("Failed to construct tokens from URL")
                return
        }

        do {
            let noItems = try keychain.allPersistentTokens()


        // Modify the token
        let modifiedToken = Token(name: "???", issuer: "!", generator: token.generator.successor())
        do {
            let modifiedKeychainItem = try keychain.updatePersistentToken(keychainItem,
                withToken: modifiedToken)
