@Test
public void createBondWhileConnectedTest() {

    BluetoothGattCallback callback = connectAndGetCallback();
    callback.onConnectionStateChange(gatt, GATT_SUCCESS, STATE_CONNECTED);
    peripheral.createBond();
    verify(device).createBond();
}