@Test
public void onConnectionStateChangedConnectedAlreadyBondedTest() throws Exception {

    when(device.getBondState()).thenReturn(BOND_BONDED);
    BluetoothGattCallback callback = connectAndGetCallback();
    callback.onConnectionStateChange(gatt, GATT_SUCCESS, BluetoothProfile.STATE_CONNECTED);
    ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
    verify(gatt).discoverServices();
}