summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
index 8ecac08bc..935c52fb4 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
@@ -3648,7 +3648,8 @@ public class WifiServiceImplTest extends WifiBaseTest {
&& filter.hasAction(Intent.ACTION_PACKAGE_CHANGED)));
int uid = TEST_UID;
String packageName = TEST_PACKAGE_NAME;
- when(mPackageManager.getApplicationInfo(TEST_PACKAGE_NAME, 0)).thenReturn(null);
+ doThrow(new PackageManager.NameNotFoundException()).when(mPackageManager)
+ .getApplicationInfo(TEST_PACKAGE_NAME, 0);
// Send the broadcast
Intent intent = new Intent(Intent.ACTION_PACKAGE_FULLY_REMOVED);
intent.putExtra(Intent.EXTRA_UID, uid);