public RxBleDevice build() {
            if (this.deviceMacAddress == null) throw new IllegalStateException("DeviceMacAddress required."
                    + " DeviceBuilder#deviceMacAddress should be called.");
            if (this.scanRecord == null && this.legacyScanRecord == null)
                throw new IllegalStateException("ScanRecord required. DeviceBuilder#scanRecord should be called.");

            RxBleConnectionMock connMock = connectionMock == null ? connectionMockBuilder.build() : connectionMock;
            // legacy
            if (scanRecord == null) {
                RxBleDeviceMock rxBleDeviceMock = new RxBleDeviceMock(deviceName,
                        deviceMacAddress,
                        legacyScanRecord,
                        connMock.getRssi(),
                        connMock.getRxBleDeviceServices(),
                        connMock.getCharacteristicNotificationSources(),
                        bluetoothDevice);
                for (UUID service : connMock.getServiceUuids()) {
                    rxBleDeviceMock.addAdvertisedUUID(service);
                }
                return rxBleDeviceMock;
            }
            return new RxBleDeviceMock(deviceName,
                    deviceMacAddress,
                    scanRecord,
                    bluetoothDevice,
                    connMock
                    );
        }
Create the {@link RxBleDeviceMock} instance using the configured values.
mockrxandroidble/src/main/java/com/polidea/rxandroidble2/mockrxandroidble/RxBleDeviceMock.java