Fix more sonars in xacml-pdp
[policy/xacml-pdp.git] / applications / common / src / test / java / org / onap / policy / pdp / xacml / application / common / XacmlPolicyUtilsTest.java
index d3aba91..9ff8142 100644 (file)
@@ -211,9 +211,10 @@ public class XacmlPolicyUtilsTest {
         assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() ->
             XacmlPolicyUtils.writePolicyFile(fileTemp, "not a policy")
         );
+
+        Path rootPath = policyFolder.getRoot().toPath();
         assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() ->
-            XacmlPolicyUtils.constructUniquePolicyFilename("not a policy",
-                    policyFolder.getRoot().toPath())
+            XacmlPolicyUtils.constructUniquePolicyFilename("not a policy", rootPath)
         );
     }