diff --git a/javatests/google/registry/dns/writer/clouddns/CloudDnsWriterTest.java b/javatests/google/registry/dns/writer/clouddns/CloudDnsWriterTest.java index f109462da..ad408396a 100644 --- a/javatests/google/registry/dns/writer/clouddns/CloudDnsWriterTest.java +++ b/javatests/google/registry/dns/writer/clouddns/CloudDnsWriterTest.java @@ -59,8 +59,8 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import org.mockito.ArgumentCaptor; +import org.mockito.ArgumentMatchers; import org.mockito.Captor; -import org.mockito.Matchers; import org.mockito.Mock; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; @@ -428,10 +428,13 @@ public class CloudDnsWriterTest { public void retryMutateZoneOnError() { CloudDnsWriter spyWriter = spy(writer); // First call - throw. Second call - do nothing. - doThrow(ZoneStateException.class).doNothing().when(spyWriter).mutateZone(Matchers.any()); + doThrow(ZoneStateException.class) + .doNothing() + .when(spyWriter) + .mutateZone(ArgumentMatchers.any()); spyWriter.commit(); - verify(spyWriter, times(2)).mutateZone(Matchers.any()); + verify(spyWriter, times(2)).mutateZone(ArgumentMatchers.any()); } @Test diff --git a/javatests/google/registry/flows/EppControllerTest.java b/javatests/google/registry/flows/EppControllerTest.java index ea55bbd69..feacf3e61 100644 --- a/javatests/google/registry/flows/EppControllerTest.java +++ b/javatests/google/registry/flows/EppControllerTest.java @@ -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); diff --git a/javatests/google/registry/flows/EppToolActionTest.java b/javatests/google/registry/flows/EppToolActionTest.java index 298229b11..f697b206e 100644 --- a/javatests/google/registry/flows/EppToolActionTest.java +++ b/javatests/google/registry/flows/EppToolActionTest.java @@ -16,8 +16,8 @@ package google.registry.flows; import static com.google.common.truth.Truth.assertThat; import static java.nio.charset.StandardCharsets.UTF_8; +import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.eq; -import static org.mockito.Mockito.isA; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; diff --git a/javatests/google/registry/tools/CreateRegistrarCommandTest.java b/javatests/google/registry/tools/CreateRegistrarCommandTest.java index c5db41f79..bcf1780e1 100644 --- a/javatests/google/registry/tools/CreateRegistrarCommandTest.java +++ b/javatests/google/registry/tools/CreateRegistrarCommandTest.java @@ -40,8 +40,8 @@ import org.joda.money.CurrencyUnit; import org.joda.time.DateTime; import org.junit.Before; import org.junit.Test; +import org.mockito.ArgumentMatchers; import org.mockito.Mock; -import org.mockito.Mockito; /** Unit tests for {@link CreateRegistrarCommand}. */ public class CreateRegistrarCommandTest extends CommandTestCase { @@ -238,10 +238,10 @@ public class CreateRegistrarCommandTest extends CommandTestCase