summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Android Build Merger (Role) <noreply-android-build-merger@google.com> 2018-09-07 16:55:56 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-09-07 16:55:56 +0000
commite39414c82ba2e2e488a280fd188a469b21754b7f (patch)
tree9ab532c178ecc0318a23821c0096a5db61d983a0
parent75edffed94602bb3f41a890b27bdd7ad877a8c38 (diff)
parent71df0f7b60d36c9cf35d2c7dc4dccdfcf7172b11 (diff)
Merge changes from topic "am-6bdea688c28849268d6f61289e1dda00"
* changes: Merge "Fix usage of internal mockito API" am: 5666119e79 am: a51e37783a am: b1f9c6200a Merge "Fix usage of internal mockito API" am: 5666119e79 am: 2b0ee6cae3 Fix usage of internal mockito API am: 404b021b1f am: de5e2f221d
-rw-r--r--tests/TtsTests/src/com/android/speech/tts/TextToSpeechTests.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/TtsTests/src/com/android/speech/tts/TextToSpeechTests.java b/tests/TtsTests/src/com/android/speech/tts/TextToSpeechTests.java
index 918873bf0bdd..d9bb7db17685 100644
--- a/tests/TtsTests/src/com/android/speech/tts/TextToSpeechTests.java
+++ b/tests/TtsTests/src/com/android/speech/tts/TextToSpeechTests.java
@@ -28,6 +28,7 @@ import org.mockito.internal.stubbing.StubberImpl;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.mockito.stubbing.Stubber;
+import org.mockito.quality.Strictness;
import junit.framework.Assert;
import java.util.Locale;
@@ -210,12 +211,16 @@ public class TextToSpeechTests extends InstrumentationTestCase {
}
public static abstract class CountDownBehaviour extends StubberImpl {
+ public CountDownBehaviour(Strictness strictness) {
+ super(strictness);
+ }
+
/** Used to mock methods that return a result. */
public abstract Stubber andReturn(Object result);
}
public static CountDownBehaviour doCountDown(final CountDownLatch latch) {
- return new CountDownBehaviour() {
+ return new CountDownBehaviour(Strictness.WARN) {
@Override
public <T> T when(T mock) {
return Mockito.doAnswer(new Answer<Void>() {
@@ -229,7 +234,7 @@ public class TextToSpeechTests extends InstrumentationTestCase {
@Override
public Stubber andReturn(final Object result) {
- return new StubberImpl() {
+ return new StubberImpl(Strictness.WARN) {
@Override
public <T> T when(T mock) {
return Mockito.doAnswer(new Answer<Object>() {