     
     func testAuthorizedWhenInUseFailure() {
         CLLocationManagerMock._authorizationStatus = .NotDetermined
-        let mock = CLLocationManagerMock()
-        let locationManager = LocationManagerUT(clLocationManager: mock)
-        let expectation = expectationWithDescription("onFailure fulfilled for future")
-        let future = locationManager.authorize(.AuthorizedWhenInUse)
-        future.onSuccess {
-            XCTAssert(false, "onSuccess called")
-        }
-        future.onFailure{error in
-            XCTAssert(mock.requestWhenInUseAuthorizationCalled, "requestWhenInUseAuthorization not called")
+        let expectation = expectationWithDescription("onFailure fulfilled for future")
+        let future = self.locationManager.authorize(.AuthorizedWhenInUse)
+        future.onSuccess {
+            XCTAssert(false, "onSuccess called")
+        }
+        future.onFailure{error in
+            XCTAssert(self.mock.requestWhenInUseAuthorizationCalled, "requestWhenInUseAuthorization not called")
             XCTAssert(error.code == LocationError.AuthorisedWhenInUseFailed.rawValue, "Error code invalid")
             expectation.fulfill()
         }

    
    func testAuthorizedAlwaysWhenAuthorizedAlways() {
        CLLocationManagerMock._authorizationStatus = .AuthorizedAlways
        let mock = CLLocationManagerMock()
        let locationManager = LocationManagerUT(clLocationManager: mock)
        let expectation = expectationWithDescription("onSuccess fulfilled for future")
        let future = locationManager.authorize(.AuthorizedAlways)
        future.onSuccess {
            XCTAssertFalse(mock.requestAlwaysAuthorizationCalled, "requestAlwaysAuthorization called")
            expectation.fulfill()
        }
        future.onFailure{error in


    func testAuthorizedAlwaysFailure() {
        CLLocationManagerMock._authorizationStatus = .NotDetermined
        let expectation = expectationWithDescription("onFailure fulfilled for future")
        let future = self.locationManager.authorize(.AuthorizedAlways)
        future.onSuccess {
            XCTAssert(false, "onSuccess called")
        }
        future.onFailure{error in
            XCTAssert(self.mock.requestAlwaysAuthorizationCalled, "requestAlwaysAuthorization not called")
            expectation.fulfill()
        }
        self.locationManager.didChangeAuthorizationStatus(.Denied)
        waitForExpectationsWithTimeout(2) {error in
            XCTAssertNil(error, "\(error)")
        }
