Fix some sonars in policy-models
[policy/models.git] / models-interactions / model-impl / so / src / test / java / org / onap / policy / so / SoRequestDetailsTest.java
index 64f6ee5..2fea0f8 100644 (file)
@@ -4,15 +4,15 @@
  * ================================================================================
  * Copyright (C) 2018 Ericsson. All rights reserved.
  * ================================================================================
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved
  * Modifications Copyright (C) 2019 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,11 +27,11 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.util.ArrayList;
 import java.util.List;
-
 import org.junit.Test;
 
 public class SoRequestDetailsTest {
@@ -40,13 +40,13 @@ public class SoRequestDetailsTest {
     public void testConstructor() {
         SoRequestDetails obj = new SoRequestDetails();
 
-        assertTrue(obj.getCloudConfiguration() == null);
-        assertTrue(obj.getModelInfo() == null);
-        assertTrue(obj.getRequestInfo() == null);
-        assertTrue(obj.getRequestParameters() == null);
-        assertTrue(obj.getSubscriberInfo() == null);
+        assertNull(obj.getCloudConfiguration());
+        assertNull(obj.getModelInfo());
+        assertNull(obj.getRequestInfo());
+        assertNull(obj.getRequestParameters());
+        assertNull(obj.getSubscriberInfo());
 
-        assertTrue(obj.getRelatedInstanceList() != null);
+        assertNotNull(obj.getRelatedInstanceList());
         assertEquals(0, obj.getRelatedInstanceList().size());
     }
 
@@ -74,7 +74,7 @@ public class SoRequestDetailsTest {
         obj.setSubscriberInfo(subscriberInfo);
         assertEquals(subscriberInfo, obj.getSubscriberInfo());
     }
-    
+
     @Test
     public void testSoMRequestDetailsMethods() {
         SoRequestDetails details = new SoRequestDetails();
@@ -119,7 +119,7 @@ public class SoRequestDetailsTest {
         assertTrue(details.equals(copiedDetails));
         assertFalse(details.equals(null));
         assertFalse(details.equals("Hello"));
-        
+
         details.setCloudConfiguration(null);
         assertFalse(details.equals(copiedDetails));
         copiedDetails.setCloudConfiguration(null);
@@ -137,7 +137,7 @@ public class SoRequestDetailsTest {
         assertFalse(details.equals(copiedDetails));
         copiedDetails.setModelInfo(modelInfo);
         assertTrue(details.equals(copiedDetails));
-        
+
         details.setRequestInfo(null);
         assertFalse(details.equals(copiedDetails));
         copiedDetails.setRequestInfo(null);