aboutsummaryrefslogtreecommitdiffstats
path: root/models-sim/models-sim-dmaap/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-02-11 17:06:38 -0500
committerJim Hahn <jrh3@att.com>2021-02-11 17:09:55 -0500
commitec348b97648f1e927365d17d376495bbd2b39c67 (patch)
treeb81f91fedc7e774ac8c055950577d21b5f21be62 /models-sim/models-sim-dmaap/src
parentb7097d21c25a48c9d209548ac8afdc09b1679457 (diff)
Fix sonars from depeendency upgrade
The dependency upgrades in policy-parent caused some new sonars. In particular, initMocks() has been deprecated - replaced with calls to the Mockito Runner, in most cases. Changed to openMocks() in one case and removed unnecessary stubbings. Issue-ID: POLICY-2905 Change-Id: I9aa098aa7aaebba09f6dcea4cac69ac1e5fbd4d6 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-sim/models-sim-dmaap/src')
-rw-r--r--models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java b/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java
index 6c79ce9f8..3d72f2e4c 100644
--- a/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java
+++ b/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,15 +44,17 @@ import javax.ws.rs.core.Response.Status;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.coder.StandardCoderObject;
import org.onap.policy.models.sim.dmaap.parameters.DmaapSimParameterGroup;
+@RunWith(MockitoJUnitRunner.class)
public class DmaapSimProviderTest {
private static final String EXPECTED_EXCEPTION = "expected exception";
private static final long SWEEP_SEC = 10L;
@@ -86,8 +88,6 @@ public class DmaapSimProviderTest {
*/
@Before
public void setUp() {
- MockitoAnnotations.initMocks(this);
-
when(params.getTopicSweepSec()).thenReturn(SWEEP_SEC);
prov = new MyProvider(params);