14
14
import org .matomo .sdk .QueryParams ;
15
15
import org .matomo .sdk .TrackMe ;
16
16
import org .matomo .sdk .tools .Connectivity ;
17
- import org .mockito .Matchers ;
17
+ import org .mockito .ArgumentMatchers ;
18
18
import org .mockito .Mock ;
19
19
import org .mockito .MockitoAnnotations ;
20
20
import org .mockito .invocation .InvocationOnMock ;
@@ -85,12 +85,12 @@ public Boolean answer(InvocationOnMock invocation) throws Throwable {
85
85
List <Event > drainTarget = invocation .getArgument (0 );
86
86
mEventCacheData .drainTo (drainTarget );
87
87
return null ;
88
- }).when (mEventCache ).drainTo (Matchers .anyList ());
88
+ }).when (mEventCache ).drainTo (ArgumentMatchers .anyList ());
89
89
doAnswer (invocation -> {
90
90
List <Event > toRequeue = invocation .getArgument (0 );
91
91
mEventCacheData .addAll (toRequeue );
92
92
return null ;
93
- }).when (mEventCache ).requeue (Matchers .anyList ());
93
+ }).when (mEventCache ).requeue (ArgumentMatchers .anyList ());
94
94
doAnswer (invocation -> {
95
95
mEventCacheData .clear ();
96
96
return null ;
@@ -148,14 +148,14 @@ public void testDispatchMode_wifiOnly() throws Exception {
148
148
mDispatcher .forceDispatch ();
149
149
150
150
verify (mEventCache , timeout (1000 )).updateState (false );
151
- verify (mEventCache , never ()).drainTo (Matchers .anyList ());
151
+ verify (mEventCache , never ()).drainTo (ArgumentMatchers .anyList ());
152
152
153
153
when (mConnectivity .getType ()).thenReturn (Connectivity .Type .WIFI );
154
154
mDispatcher .forceDispatch ();
155
155
await ().atMost (1 , TimeUnit .SECONDS ).until (() -> dryRunData .size (), is (1 ));
156
156
157
157
verify (mEventCache ).updateState (true );
158
- verify (mEventCache ).drainTo (Matchers .anyList ());
158
+ verify (mEventCache ).drainTo (ArgumentMatchers .anyList ());
159
159
}
160
160
161
161
@ Test
@@ -168,7 +168,7 @@ public void testConnectivityChange() throws Exception {
168
168
mDispatcher .forceDispatch ();
169
169
170
170
verify (mEventCache , timeout (1000 )).add (any ());
171
- verify (mEventCache , never ()).drainTo (Matchers .anyList ());
171
+ verify (mEventCache , never ()).drainTo (ArgumentMatchers .anyList ());
172
172
assertThat (dryRunData .size (), is (0 ));
173
173
174
174
when (mConnectivity .isConnected ()).thenReturn (true );
@@ -177,7 +177,7 @@ public void testConnectivityChange() throws Exception {
177
177
await ().atMost (1 , TimeUnit .SECONDS ).until (() -> dryRunData .size (), is (1 ));
178
178
179
179
verify (mEventCache ).updateState (true );
180
- verify (mEventCache ).drainTo (Matchers .anyList ());
180
+ verify (mEventCache ).drainTo (ArgumentMatchers .anyList ());
181
181
}
182
182
183
183
@ Test
0 commit comments