From b2e61a292bc8a9edbed1569ab5655e2ee17a8f3b Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 8 Apr 2020 10:04:29 -0400 Subject: More sonar fixes in models Addressed the following sonar issues: - missing assert in junit - duplicate code blocks - fixed those in the simulators - leaving the others in the concept classes for Liam/"G" Issue-ID: POLICY-2305 Change-Id: Icfe80afb378b4cdec4de3d33d0e33227e04845d8 Signed-off-by: Jim Hahn --- .../model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'models-interactions/model-impl/so') diff --git a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java index d496455eb..e45ee0aea 100644 --- a/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java +++ b/models-interactions/model-impl/so/src/test/java/org/onap/policy/so/DemoTest.java @@ -21,9 +21,10 @@ package org.onap.policy.so; +import static org.junit.Assert.assertNotNull; + import java.util.HashMap; import java.util.Map; - import org.junit.Test; import org.onap.policy.so.util.Serialization; import org.slf4j.Logger; @@ -103,6 +104,7 @@ public class DemoTest { logger.debug(Serialization.gsonPretty.toJson(request)); + assertNotNull(request); } @Test @@ -166,6 +168,8 @@ public class DemoTest { request.getRequestDetails().getRelatedInstanceList().add(relatedInstanceListElement2); logger.debug(Serialization.gsonPretty.toJson(request)); + + assertNotNull(request); } } -- cgit 1.2.3-korg