         ]
 
         for expectedPassword: String in expectedValues {
-            token.updatePassword()
+            token = token.updatedToken()
             XCTAssertEqualObjects(token.password(), expectedPassword, "The generator did not produce the expected OTP.")
         }
     }


        for (var i = 0, j = 0; i < intervals.count; i++) {
            for algorithm in algorithms {
                let token = OTPToken()
                token.type = .Timer
                token.secret = secret
                token.algorithm = algorithm
                token.digits = 6
                token.period = 30
                token.counter = UInt64(intervals[i] / token.period)
                
                XCTAssertEqualObjects(results[j],
                                      token.generatePasswordForCounter(token.counter),
                                      "Invalid result \(i), \(algorithm), \(intervals[i])")
                j++
            }


        for (algorithm, secretKey) in secretKeys {
            let secret = secretKey.dataUsingEncoding(NSASCIIStringEncoding)
            let token = Token(type: .Timer, secret: secret, algorithm: algorithm, digits: 8, period: 30)

            for (var i = 0; i < times.count; i++) {
                if let password = expectedValues[algorithm]?[i] {
                    let counter = UInt64(times[i] / token.period)
                    XCTAssertEqualObjects(token.passwordForCounter(counter), password, "The generator did not produce the expected OTP.")
                }
            }
        }
