From fee1cae825bad9459edcefb67fa600874d875816 Mon Sep 17 00:00:00 2001 From: Ningyuan Wang Date: Thu, 23 Mar 2017 16:16:00 -0700 Subject: Fix WifiScanningServiceTest This fixes WifiScanningServiceTest by replacing any(Foo.class) with any(). any() is able to match null. Bug: 36407367 Test: compile, unit tests Change-Id: I04adfea054086f38a9d8a03f800f9436d6ad1d78 --- .../src/com/android/server/wifi/scanner/WifiScanningServiceTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java index 02cb633d0..e38a3897a 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java @@ -33,7 +33,6 @@ import android.net.wifi.WifiScanner; import android.os.Binder; import android.os.Bundle; import android.os.Handler; -import android.os.Looper; import android.os.Message; import android.os.RemoteException; import android.os.UserHandle; @@ -115,7 +114,7 @@ public class WifiScanningServiceTest { mLooper = new TestLooper(); when(mWifiScannerImplFactory - .create(any(Context.class), any(Looper.class), any(Clock.class))) + .create(any(), any(), any())) .thenReturn(mWifiScannerImpl); when(mWifiScannerImpl.getChannelHelper()).thenReturn(channelHelper); when(mWifiInjector.getWifiMetrics()).thenReturn(mWifiMetrics); @@ -436,7 +435,7 @@ public class WifiScanningServiceTest { startServiceAndLoadDriver(); mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog); verify(mWifiScannerImplFactory, times(1)) - .create(any(Context.class), any(Looper.class), any(Clock.class)); + .create(any(), any(), any()); Handler handler = mock(Handler.class); BidirectionalAsyncChannel controlChannel = connectChannel(handler); -- cgit v1.2.3