Skip to content

Commit 81a6a01

Browse files
committed
upgrade mockito to 4.5.1
1 parent 760f880 commit 81a6a01

24 files changed

+72
-45
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ dependencies {
8383
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
8484
testCompile group: 'io.grpc', name: 'grpc-testing', version: '1.54.2'
8585
testImplementation 'io.opentracing:opentracing-mock:0.33.0'
86+
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.5.1'
8687
}
8788

8889
license {

src/test/java/com/uber/cadence/activity/LocalActivityContextPropagationTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@
3939
import java.util.Map;
4040
import java.util.Optional;
4141
import org.junit.Test;
42-
import org.junit.runner.RunWith;
43-
import org.mockito.runners.MockitoJUnitRunner;
4442

45-
@RunWith(MockitoJUnitRunner.class)
4643
public class LocalActivityContextPropagationTest {
4744

4845
private static final String LOCAL_ACTIVITY_CP_TASK_LIST = "LOCAL_ACTIVITY_CP_TASK_LIST";

src/test/java/com/uber/cadence/internal/compatibility/ProtoObjects.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
115
package com.uber.cadence.internal.compatibility;
216

317
import com.google.common.collect.ImmutableList;

src/test/java/com/uber/cadence/internal/compatibility/Thrift2ProtoAdapterTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import static org.junit.Assert.assertEquals;
2121
import static org.junit.Assert.assertNotNull;
22-
import static org.mockito.Matchers.any;
22+
import static org.mockito.ArgumentMatchers.any;
2323
import static org.mockito.Mockito.doAnswer;
2424

2525
import com.uber.cadence.SignalWithStartWorkflowExecutionAsyncRequest;
@@ -157,9 +157,10 @@ private void assertTracingHeaders(Header header) {
157157
.toString());
158158
}
159159

160+
@SuppressWarnings("CheckReturnValue")
160161
private <REQ, RES> ArgumentCaptor<REQ> mockRpc(
161162
BiConsumer<REQ, StreamObserver<RES>> method, RES value) {
162-
ArgumentCaptor<REQ> captor = new ArgumentCaptor<>();
163+
ArgumentCaptor<REQ> captor = ArgumentCaptor.forClass(null);
163164
doAnswer(
164165
invocation -> {
165166
@SuppressWarnings("unchecked")

src/test/java/com/uber/cadence/internal/compatibility/ThriftObjects.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
115
package com.uber.cadence.internal.compatibility;
216

317
import com.google.common.collect.ImmutableList;

src/test/java/com/uber/cadence/internal/compatibility/proto/DecisionMapperTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/**
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* <p>Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* <p>Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
* except in compliance with the License. A copy of the License is located at
8+
*
9+
* <p>http://aws.amazon.com/apache2.0
10+
*
11+
* <p>or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
13+
* specific language governing permissions and limitations under the License.
14+
*/
115
package com.uber.cadence.internal.compatibility.proto;
216

317
import static com.uber.cadence.internal.compatibility.MapperTestUtil.assertMissingFields;

src/test/java/com/uber/cadence/internal/replay/ReplayDeciderCacheTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
import static junit.framework.TestCase.assertEquals;
2121
import static org.junit.Assert.*;
22-
import static org.mockito.Matchers.anyInt;
23-
import static org.mockito.Matchers.eq;
2422
import static org.mockito.Mockito.*;
2523

2624
import com.uber.cadence.HistoryEvent;

src/test/java/com/uber/cadence/internal/replay/ReplayDeciderTaskHandlerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import static junit.framework.TestCase.assertEquals;
2222
import static junit.framework.TestCase.assertNotNull;
2323
import static org.junit.Assert.assertNull;
24-
import static org.mockito.Matchers.any;
24+
import static org.mockito.ArgumentMatchers.any;
2525
import static org.mockito.Mockito.mock;
2626
import static org.mockito.Mockito.when;
2727

src/test/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import static org.junit.Assert.assertEquals;
2424
import static org.junit.Assert.assertFalse;
2525
import static org.junit.Assert.assertTrue;
26-
import static org.mockito.Matchers.any;
26+
import static org.mockito.ArgumentMatchers.any;
2727
import static org.mockito.Mockito.mock;
2828
import static org.mockito.Mockito.when;
2929

src/test/java/com/uber/cadence/internal/shadowing/ScanWorkflowActivityTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
import static org.junit.Assert.assertEquals;
1919
import static org.junit.Assert.assertTrue;
20-
import static org.mockito.Matchers.any;
21-
import static org.mockito.Matchers.eq;
20+
import static org.mockito.ArgumentMatchers.any;
21+
import static org.mockito.ArgumentMatchers.eq;
2222
import static org.mockito.Mockito.mock;
2323
import static org.mockito.Mockito.when;
2424

0 commit comments

Comments
 (0)