private int intToSignedBits(int i, int size) {
        if (i < 0) {
            i = (1 << size - 1) + (i & ((1 << size - 1) - 1));
        }
        return i;
    }
Used for mocks and constants in rxandroidble, but instances created in mockrxandroidble, so the methods must be implemented
rxandroidble/src/test/java/android/bluetooth/BluetoothGattCharacteristic.java