aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/listeners/ScoListenerTest.java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-02-10 14:23:02 -0500
committerJim Hahn <jrh3@att.com>2021-02-10 14:26:29 -0500
commite3035927b9c49478e28e5ca7fca7c42c43b7300e (patch)
tree4d06bcb63231427fbc07ed77f4c7d9f0f483440e /policy-endpoints/src/test/java/org/onap/policy/common/endpoints/listeners/ScoListenerTest.java
parent98d2ab1beb887658521d4ff42ba6b17a97f8ebae (diff)
More sonar issues in common
Addressed the issues: - use of eq() in verify() - remove @NamedQueries - use computeIfAbsent() Issue-ID: POLICY-2914 Change-Id: I265bc98f0f326e7b4ce86c25e68fc4859bd7fb02 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-endpoints/src/test/java/org/onap/policy/common/endpoints/listeners/ScoListenerTest.java')
-rw-r--r--policy-endpoints/src/test/java/org/onap/policy/common/endpoints/listeners/ScoListenerTest.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/listeners/ScoListenerTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/listeners/ScoListenerTest.java
index 8543b73e..a782e4b2 100644
--- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/listeners/ScoListenerTest.java
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/listeners/ScoListenerTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * 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.
@@ -22,7 +22,6 @@ package org.onap.policy.common.endpoints.listeners;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -111,14 +110,14 @@ public class ScoListenerTest {
status = new MyMessage(NAME);
sco = makeSco(status);
primary.onTopicEvent(INFRA, TOPIC, sco);
- verify(primary).onTopicEvent(eq(INFRA), eq(TOPIC), eq(sco), eq(status));
+ verify(primary).onTopicEvent(INFRA, TOPIC, sco, status);
assertFalse(appender.getExtracted().toString().contains("unable to decode"));
// undecodable message
logger.addAppender(appender);
primary.onTopicEvent(INFRA, TOPIC, makeSco("[]"));
- verify(primary, times(1)).onTopicEvent(eq(INFRA), eq(TOPIC), eq(sco), eq(status));
+ verify(primary, times(1)).onTopicEvent(INFRA, TOPIC, sco, status);
assertTrue(appender.getExtracted().toString().contains("unable to decode"));
}