summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java b/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java
index eb6af0f86..e9351258f 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java
@@ -41,6 +41,7 @@ import java.util.List;
@SmallTest
public class WifiLastResortWatchdogTest {
WifiLastResortWatchdog mLastResortWatchdog;
+ @Mock WifiInjector mWifiInjector;
@Mock WifiMetrics mWifiMetrics;
@Mock SelfRecovery mSelfRecovery;
@Mock ClientModeImpl mClientModeImpl;
@@ -61,7 +62,8 @@ public class WifiLastResortWatchdogTest {
public void setUp() throws Exception {
initMocks(this);
mLooper = new TestLooper();
- mLastResortWatchdog = new WifiLastResortWatchdog(mSelfRecovery, mClock, mWifiMetrics,
+ when(mWifiInjector.getSelfRecovery()).thenReturn(mSelfRecovery);
+ mLastResortWatchdog = new WifiLastResortWatchdog(mWifiInjector, mClock, mWifiMetrics,
mClientModeImpl, mLooper.getLooper());
mLastResortWatchdog.setBugReportProbability(1);
}