Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e39414c8 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge changes from topic "am-6bdea688c28849268d6f61289e1dda00"

* changes:
  Merge "Fix usage of internal mockito API" am: 5666119e am: a51e3778 am: b1f9c620
  Merge "Fix usage of internal mockito API" am: 5666119e am: 2b0ee6ca
  Fix usage of internal mockito API am: 404b021b am: de5e2f22
parents 75edffed 71df0f7b
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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>() {