         }
         future.onFailure {error in
             onFailureExpectation.fulfill()
-            XCTAssert(error.code == BCError.peripheralDisconnected.code, "Error code invalid")
+            XCTAssertEqual(error.code, BCError.peripheralDisconnected.code, "Error code invalid")
+            XCTAssertEqual(mockPeripheral.discoverServicesCalledCount, 0, "CBPeripheral#discoverServices called more than once")
             XCTAssertFalse(mockPeripheral.discoverServicesCalled, "CBPeripheral#discoverServices called")
-            XCTAssert(mockPeripheral.discoverServicesCalledCount == 0, "CBPeripheral#discoverServices called more than once")
             XCTAssertFalse(mockPeripheral.discoverCharacteristicsCalled, "CBPeripheral#discoverChracteristics called")
         }
         waitForExpectationsWithTimeout(2) {error in

        future.onSuccess {_ in
            onSuccessExpectation.fulfill()
            let discoveredServices = peripheral.services
            XCTAssert(discoveredServices.count == 2, "Peripheral service count invalid")
            XCTAssert(mockPeripheral.discoverServicesCalledCount == 1, "CBPeripheral#discoverServices called more than once")
            XCTAssert(mockPeripheral.discoverServicesCalled, "CBPeripheral#discoverServices not called")
            XCTAssertFalse(mockPeripheral.discoverCharacteristicsCalled, "CBPeripheral#discoverChracteristics called")
        }

        future.onSuccess {_ in
            onSuccessExpectation.fulfill()
            let discoveredServices = peripheral.services
            XCTAssertEqual(discoveredServices.count, 2, "Peripheral service count invalid")
            XCTAssert(mockPeripheral.discoverServicesCalled, "CBPeripheral#discoverServices not called")
        }
        future.onFailure {error in
