         let expectation = expectationWithDescription("onFailure fulfilled for future")
         let future = peripheralManager.startAdvertising(FLBeaconRegion(proximityUUID: NSUUID(), identifier: "Beacon Regin"))
         future.onSuccess {
+            expectation.fulfill()
             XCTFail("onSuccess called")
         }
         future.onFailure {error in

        let expectation = expectationWithDescription("onFailure fulfilled for future")
        let future = peripheralManager.startAdvertising(FLBeaconRegion(proximityUUID: NSUUID(), identifier: "Beacon Regin"))
        future.onSuccess {
            XCTFail("onSuccess called")
        }
        future.onFailure { error in

            }
        }
        future.onFailure {error in
            expectation.fulfill()
            XCTFail("onFailure called")
        }
        peripheralManager.didStartAdvertising(nil)
