OSDN Git Service

Refactor code incompatible with Mockito 2.7.13
authorPaul Duffin <paulduffin@google.com>
Fri, 10 Mar 2017 14:59:09 +0000 (14:59 +0000)
committerPaul Duffin <paulduffin@google.com>
Fri, 10 Mar 2017 14:59:09 +0000 (14:59 +0000)
Bug: 32912773
Test: make checkbuild
Change-Id: Idcd89438aa05ed2d010934cc6613763d4cfb9885

tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java

index 40958ba..4a62011 100644 (file)
@@ -37,9 +37,9 @@ import java.util.List;
 import java.util.Map;
 
 import org.mockito.ArgumentCaptor;
-import org.mockito.ArgumentMatcher;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
+import org.mockito.compat.ArgumentMatcher;
 
 public class PreferenceListTest extends AndroidTestCase {
     private static final String TAG = "PreferenceListTest";
@@ -138,7 +138,7 @@ public class PreferenceListTest extends AndroidTestCase {
 
         final ArgumentMatcher<VpnProfile> equalsFake = new ArgumentMatcher<VpnProfile>() {
             @Override
-            public boolean matches(final Object arg) {
+            public boolean matchesObject(final Object arg) {
                 if (arg == vpnProfile) return true;
                 if (arg == null) return false;
                 return TextUtils.equals(((VpnProfile) arg).key, vpnProfile.key);