diff options
author | Taka Cho <takamune.cho@att.com> | 2020-06-10 10:48:42 -0400 |
---|---|---|
committer | Taka Cho <takamune.cho@att.com> | 2020-06-10 16:17:36 -0400 |
commit | ad08d0685db264df653166fa784e8005e9d62619 (patch) | |
tree | 37c80850fe13b8316eb093bd2974b5c74b148f0e /controlloop/m2/adapters/src | |
parent | dcc7cac5f17dacf9a58b18b518574391cdc73925 (diff) |
sonar issue drools applications - 3
get already returns string
redudant return block
unused import
swap expected argument
use equals method instead
useless assignment for payload
Issue-ID: POLICY-2616
Change-Id: Ie4f07085994420b7ea3f39db89f980f6594f01b7
Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'controlloop/m2/adapters/src')
-rw-r--r-- | controlloop/m2/adapters/src/test/java/org/onap/policy/m2/adapters/VirtualOnsetAdapterTest.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/controlloop/m2/adapters/src/test/java/org/onap/policy/m2/adapters/VirtualOnsetAdapterTest.java b/controlloop/m2/adapters/src/test/java/org/onap/policy/m2/adapters/VirtualOnsetAdapterTest.java index 0ecbda672..c19a80e7e 100644 --- a/controlloop/m2/adapters/src/test/java/org/onap/policy/m2/adapters/VirtualOnsetAdapterTest.java +++ b/controlloop/m2/adapters/src/test/java/org/onap/policy/m2/adapters/VirtualOnsetAdapterTest.java @@ -21,6 +21,7 @@ package org.onap.policy.m2.adapters; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.junit.Test; @@ -39,15 +40,15 @@ public class VirtualOnsetAdapterTest { VirtualControlLoopEvent virtualControlLoopEvent = new VirtualControlLoopEvent(); VirtualOnsetAdapter virtualOnsetAdapter = VirtualOnsetAdapter.class.cast(OnsetAdapter.get(virtualControlLoopEvent)); - assertTrue(virtualOnsetAdapter != null); + assertNotNull(virtualOnsetAdapter); ControlLoopNotification notification = virtualOnsetAdapter.createNotification(virtualControlLoopEvent); - assertTrue(notification != null); + assertNotNull(notification); // we want an exact class match, so 'instanceOf' is not being used assertEquals(VirtualControlLoopNotification.class, notification.getClass()); ControlLoopEvent controlLoopEvent = new ControlLoopEvent() {}; notification = virtualOnsetAdapter.createNotification(controlLoopEvent); - assertTrue(notification != null); + assertNotNull(notification); } } |