@Override
    public Single<byte[]> writeCharacteristic(@NonNull BluetoothGattCharacteristic bluetoothGattCharacteristic,
                                              @NonNull final byte[] data) {
        final RxBleCharacteristicWriteCallback writeCallback = characteristicWriteCallbacks
                .get(bluetoothGattCharacteristic.getUuid());
        if (writeCallback == null) {
            bluetoothGattCharacteristic.setValue(data);
            return Single.just(data);
        }
        // wrap characteristic in single so exceptions from writeCallback are handled for us
        return Single.just(bluetoothGattCharacteristic)
                .flatMap(new Function<BluetoothGattCharacteristic, SingleSource<byte[]>>() {
                    @Override
                    public SingleSource<byte[]> apply(final BluetoothGattCharacteristic characteristic) throws Exception {
                        final SingleSubject<byte[]> subj = SingleSubject.create();
                        writeCallback.handle(deviceMock, characteristic, data, new RxBleGattWriteResultMock() {
                            @Override
                            public void success() {
                                characteristic.setValue(data);
                                subj.onSuccess(data);
                            }

                            @Override
                            public void failure(int status) {
                                subj.onError(
                                        new BleGattCharacteristicException(null,
                                                characteristic,
                                                status,
                                                BleGattOperationType.CHARACTERISTIC_WRITE)
                                );
                            }

                            @Override
                            public void disconnect(int status) {
                                subj.onError(handleDisconnection(status));
                            }
                        });
                        return subj;
                    }
                });
    }
Value used to disable notifications or indicatinos
mockrxandroidble/src/main/java/com/polidea/rxandroidble2/mockrxandroidble/RxBleConnectionMock.java