Did you ever figure anything out on this? I am also trying to test some part of my application that deals with connecting to bluetooth devices.
I see that in ShadowBluetoothAdapter there is a setBondedDevices method.
However, I'm not sure how to create a set of BluetoothDevice objects because the constructor is not available. I found in Robolectric there is a method to create a new object with a private constructor - Robolectric.newInstanceOf(String class)
However I won't be able to set the address and name for the bluetooth device as I would like to. There is ShadowBluetoothDevice with a setName method and I can add setAddress methods to it easy enough, however if I create a set of these I can't pass them to BluetoothAdapter.setBondedDevices as it takes a Set of BluetoothDevice objects, not ShadowBluetoothDevice objects.
Any ideas?