         RateLimit.resetLimitForName(name)
 
         // Now it should get executed
-        let expectation2 = expectationWithDescription("Execute 2")
+        let expectation2 = expectation(description: "Execute 2")
         let reported3 = RateLimit.execute(name: name, limit: 1) {
             expectation2.fulfill()
         }
         XCTAssertTrue(reported3)
-        waitForExpectationsWithTimeout(0, handler: nil)
+        waitForExpectations(timeout: 0, handler: nil)
     }
 
 	func testResettingAll() {
         // It should get excuted first
 		let name1 = "TestResettingAll1"
-		let expecation1 = expectationWithDescription("Execute 1")
+		let expecation1 = expectation(description: "Execute 1")
 		let reported1 = RateLimit.execute(name: name1, limit: 1) {
 			expecation1.fulfill()
 		}
 		XCTAssertTrue(reported1)
 
 		let name2 = "TestResettingAll2"
-		let expecation2 = expectationWithDescription("Execute 2")
+		let expecation2 = expectation(description: "Execute 2")
 		let reported2 = RateLimit.execute(name: name2, limit: 1) {
             expecation2.fulfill()
         }

		sleep(1)

        // Now it should get executed
        let expectation2 = expectationWithDescription("Execute 2")
        reported = RateLimit.execute(name: name, limit: 1) {
            expectation2.fulfill()
        }
        XCTAssertTrue(reported)
        waitForExpectationsWithTimeout(0, handler: nil)
    }

    func testResetting() {
        let name = "testResetting"

        // It should get excuted first
        let expectation1 = expectationWithDescription("Execute 1")
        let reported1 = RateLimit.execute(name: name, limit: 1) {
            expectation1.fulfill()
        }
        XCTAssertTrue(reported1)
        waitForExpectationsWithTimeout(0, handler: nil)

        // Not right away after
        let reported2 = RateLimit.execute(name: name, limit: 1) {



//
//  RateLimitTests.swift
//  RateLimitTests
