Fix NullPointerException in CallAudioRouteStateMachineTest

In order to fix b/268442423, we move the speaker on/off operation to
another thread to run it asynchronously. However, this will cause some
mock instance interactions after we tear down the test and we get
NullPointerException when mock instance get invoked in the separated
thread. Wait for the invocation before we end the test and tear it down
to fix this.

Bug: b/301082049
Test: atest CallAudioRouteStateMachineTest
Change-Id: Ia01271cc6da56a5f9af611b7a9d05869e63fa974
diff --git a/tests/src/com/android/server/telecom/tests/CallAudioRouteStateMachineTest.java b/tests/src/com/android/server/telecom/tests/CallAudioRouteStateMachineTest.java
index 8571f1d..4a9b742 100644
--- a/tests/src/com/android/server/telecom/tests/CallAudioRouteStateMachineTest.java
+++ b/tests/src/com/android/server/telecom/tests/CallAudioRouteStateMachineTest.java
@@ -249,6 +249,7 @@
             foundValid = true;
         }
         assertTrue(foundValid);
+        verify(mockBluetoothRouteManager, timeout(1000L)).getBluetoothAudioConnectedDevice();
     }
 
     @MediumTest