Merge "Add test for setDeviceConnectionState."