shadows/framework/src/main/java/org/robolectric/shadows/ShadowBluetoothHeadset.java
@Implementation(minSdk = KITKAT)
  protected boolean sendVendorSpecificResultCode(
      BluetoothDevice device, String command, String arg) {
    if (command == null) {
      throw new IllegalArgumentException("Command cannot be null");
    }
    return allowsSendVendorSpecificResultCode && connectedDevices.contains(device);
  }
@Implementation(minSdk = KITKAT)
  protected boolean sendVendorSpecificResultCode(
      BluetoothDevice device, String command, String arg) {
    if (command == null) {
      throw new IllegalArgumentException("Command cannot be null");
    }
    return allowsSendVendorSpecificResultCode && connectedDevices.contains(device);
  }
Overrides behavior of {@link sendVendorSpecificResultCode}.

@return 'true' only if the given device has been previously added by a call to {@link
ShadowBluetoothHeadset#addConnectedDevice} and {@link
ShadowBluetoothHeadset#setAllowsSendVendorSpecificResultCode} has not been called with
'false' argument.
@throws IllegalArgumentException if 'command' argument is null, per Android API