         
         let characteristics = [
             GATTAttribute.Characteristic(uuid: type(of: batteryLevel).uuid,
-                                         value: batteryLevel.data,
-                                         permissions: [.read],
-                                         properties: [.read, .notify],
-                                         descriptors: [GATTClientCharacteristicConfiguration().descriptor])
-        ]
+                                value: batteryLevel.data,
+                                permissions: [.read],
+                                properties: [.read, .indicate],
+                                descriptors: [GATTClientCharacteristicConfiguration().descriptor]),
+            ]
         
         let service = GATTAttribute.Service(
             uuid: .batteryService,

        try await central.connect(to: device.peripheral)
        try await client(central, device.peripheral)
        // cleanup
        try await Task.sleep(nanoseconds: 1_000_000_000)
        //await central.disconnectAll()
        await peripheral.removeAllServices()
    }
    
    func test(

        )
    }
    
    func testNotification() async throws {
        
        // service
        let batteryLevel = GATTBatteryLevel(level: .max)
        
        let characteristics = [
            GATTAttribute.Characteristic(
                uuid: type(of: batteryLevel).uuid,
                value: batteryLevel.data,
                permissions: [.read, .write],
                properties: [.read, .write],
                descriptors: []
            )
        ]
        
        let service = GATTAttribute.Service(
            uuid: .batteryService,
            primary: true,
            characteristics: characteristics
        )

        let newValue = GATTBatteryLevel(level: .min)
                
        try await connect(
            serverOptions: .init(maximumTransmissionUnit: .default, maximumPreparedWrites: 1000),
            clientOptions: .init(maximumTransmissionUnit: .max, scanParameters: .gattCentralDefault),
            server: { peripheral in
                let serviceAttribute = try await peripheral.add(service: service)
                XCTAssertEqual(serviceAttribute, 1)
                let characteristicValueHandle = await peripheral.characteristics(for: .batteryLevel)[0]
                Task {
                    try await Task.sleep(nanoseconds: 1_000_000_000)
                    await peripheral.write(newValue.data, forCharacteristic: characteristicValueHandle)
                }
            },
            client: { (central, peripheral) in
                let services = try await central.discoverServices(for: peripheral)
                let clientMTU = try await central.maximumTransmissionUnit(for: peripheral)
                XCTAssertEqual(clientMTU, .default)
                guard let foundService = services.first,
                    services.count == 1
                    else { XCTFail(); return }
                XCTAssertEqual(foundService.uuid, .batteryService)
                XCTAssertEqual(foundService.isPrimary, true)
                let foundCharacteristics = try await central.discoverCharacteristics(for: foundService)
                guard let foundCharacteristic = foundCharacteristics.first,
                    foundCharacteristics.count == 1
                    else { XCTFail(); return }
                XCTAssertEqual(foundCharacteristic.uuid, .batteryLevel)
                XCTAssertEqual(foundCharacteristic.properties, [.read, .write])
                // wait for notifications
                let stream = central.notify(for: foundCharacteristic)
                for try await notification in stream {
                    guard let notificationValue = GATTBatteryLevel(data: notification) else {
                        XCTFail();
                        return
                    }
                    XCTAssertEqual(notificationValue, newValue)
                    stream.stop()
                    break
                }
            }
        )
        
        
    }
    
    func testIndication() {
        
        // FIXME: Fix mock indication
        /*
        
        // setup sockets
