 
     func testAuthorizedAlwaysFailure() {
         CLLocationManagerMock._authorizationStatus = .NotDetermined
-        let mock = CLLocationManagerMock()
-        let locationManager = LocationManagerUT(clLocationManager: mock)
-        let expectation = expectationWithDescription("onFailure fulfilled for future")
-        let future = locationManager.authorize(.AuthorizedAlways)
-        future.onSuccess {
-            XCTAssert(false, "onSuccess called")
-        }
-        future.onFailure{error in
-            XCTAssert(mock.requestAlwaysAuthorizationCalled, "requestAlwaysAuthorization not called")
-            expectation.fulfill()
-        }
-        locationManager.didChangeAuthorizationStatus(.Denied)
+        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)")
         }

class LocationManagerTests: XCTestCase {

    let testLocations = [CLLocation(latitude: 37.760412, longitude: -122.414602), CLLocation(latitude: 37.745480, longitude: -122.420092)]
    
    override func setUp() {
        super.setUp()
    }
    
    override func tearDown() {

    
    func testUpdateLocationFailure() {
        CLLocationManagerMock._authorizationStatus = .AuthorizedAlways
        let expectation = expectationWithDescription("onFailure fulfilled for future")
        let future = self.locationManager.startUpdatingLocation(authorization:.AuthorizedAlways)
        future.onSuccess {locations in
            XCTAssert(false, "onSuccess called")
        }
        future.onFailure{error in
            XCTAssert(self.mock.startUpdatingLocationCalled, "startUpdatingLocation not called")
            XCTAssertEqual(error.code, TestFailure.error.code, "Error code invalid")
            expectation.fulfill()
        }
        self.locationManager.didFailWithError(TestFailure.error)
        waitForExpectationsWithTimeout(2) {error in
            XCTAssertNil(error, "\(error)")
        }
