Allow third_party/java_src/gtld/ to use :mockito2_for_third_party

In [] a change would have been made to your project that is incompatible with
your open source integration. To make sure the open source variant of your
project remains working, we have eagerly updated your open source copy to use
Mockito 2. This CL integrates that change into [].

Please read []and
understand the consequences of this change.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=238445356
This commit is contained in:
Ben McIlwain 2019-03-14 08:16:18 -07:00
parent 1a6c068471
commit 202ed9db6a
70 changed files with 200 additions and 199 deletions

View file

@ -16,7 +16,7 @@ package google.registry.util;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.testing.LogsSubject.assertAboutLogs;
import static org.mockito.Matchers.argThat;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@ -35,7 +35,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.ArgumentMatcher;
/** Unit tests for {@link RequestStatusCheckerImpl}. */
@RunWith(JUnit4.class)
@ -53,16 +52,12 @@ public final class RequestStatusCheckerImplTest {
*/
private static LogQuery expectedLogQuery(final String requestLogId) {
return argThat(
new ArgumentMatcher<LogQuery>() {
@Override
public boolean matches(Object object) {
assertThat(object).isInstanceOf(LogQuery.class);
LogQuery logQuery = (LogQuery) object;
assertThat(logQuery.getRequestIds()).containsExactly(requestLogId);
assertThat(logQuery.getIncludeAppLogs()).isFalse();
assertThat(logQuery.getIncludeIncomplete()).isTrue();
return true;
}
object -> {
assertThat(object).isInstanceOf(LogQuery.class);
assertThat(object.getRequestIds()).containsExactly(requestLogId);
assertThat(object.getIncludeAppLogs()).isFalse();
assertThat(object.getIncludeIncomplete()).isTrue();
return true;
});
}