mirror of
https://github.com/google/nomulus
synced 2026-01-09 07:33:42 +00:00
Migrate org.mockito.Matchers#any* to org.mockito.ArgumentMatchers
The former is deprecated and replaced by the latter in Mockito 2. However, there is a
functional difference: ArgumentMatchers will reject `null` and check the type
if the matcher specified a type (e.g. `any(Class)` or `anyInt()`). `any()` will
remain to accept anything.
For more information see []
Tested:
TAP --sample ran all affected tests and none failed
[]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=250690285
This commit is contained in:
@@ -57,7 +57,7 @@ import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.mockito.Matchers;
|
||||
import org.mockito.ArgumentMatchers;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
import org.mockito.junit.MockitoRule;
|
||||
@@ -99,7 +99,7 @@ public class EppControllerTest extends ShardableTestCase {
|
||||
loggerToIntercept.addHandler(logHandler);
|
||||
|
||||
when(sessionMetadata.getClientId()).thenReturn("some-client");
|
||||
when(flowComponentBuilder.flowModule(Matchers.any())).thenReturn(flowComponentBuilder);
|
||||
when(flowComponentBuilder.flowModule(ArgumentMatchers.any())).thenReturn(flowComponentBuilder);
|
||||
when(flowComponentBuilder.build()).thenReturn(flowComponent);
|
||||
when(flowComponent.flowRunner()).thenReturn(flowRunner);
|
||||
when(eppOutput.isResponse()).thenReturn(true);
|
||||
|
||||
Reference in New Issue
Block a user