Fixed sonar issues in xacml-pdp 12/133412/1
authorSuresh Charan <suresh.charan@bell.ca>
Fri, 24 Feb 2023 19:47:02 +0000 (14:47 -0500)
committerSuresh Charan <suresh.charan@bell.ca>
Fri, 24 Feb 2023 19:47:22 +0000 (14:47 -0500)
Reduced technical debt

Issue-ID: POLICY-4536
Change-Id: I2d345cc879dbd267b4a2c0791aae153db994114b
Signed-off-by: Suresh Charan <suresh.charan@bell.ca>
main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java

index d8dc2ee..a1f1b8a 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  * Copyright (C) 2019, 2021-2022 AT&T Intellectual Property. All rights reserved.
  * Modifications Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2023 Bell Canada.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -133,14 +134,14 @@ public class XacmlStateTest {
         publisher.handlePdpUpdate(message);
 
         PdpStatistics stats = state.getStatistics();
-        assertTrue(stats != null);
+        assertNotNull(stats);
         assertEquals(GROUP, stats.getPdpGroupName());
-        assertEquals(stats.getPolicyDeployCount(), 1);
-        assertEquals(stats.getPolicyDeploySuccessCount(), 1);
-        assertEquals(stats.getPolicyDeployFailCount(), 0);
-        assertEquals(stats.getPolicyUndeployCount(), 1);
-        assertEquals(stats.getPolicyUndeployFailCount(), 1);
-        assertEquals(stats.getPolicyUndeploySuccessCount(), 0);
+        assertEquals(1, stats.getPolicyDeployCount());
+        assertEquals(1, stats.getPolicyDeploySuccessCount());
+        assertEquals(0, stats.getPolicyDeployFailCount());
+        assertEquals(1, stats.getPolicyUndeployCount());
+        assertEquals(1, stats.getPolicyUndeployFailCount());
+        assertEquals(0, stats.getPolicyUndeploySuccessCount());
 
         PdpStatistics test = new PdpStatistics();
         test.setTimeStamp(stats.getTimeStamp());