Somehow missed this sonar issue in one line of code:
- invoke only one method in a junit lambda
Issue-ID: POLICY-2681
Change-Id: I03a6708e0d3ed2a43577a63d0f3cdfc9bd76c8d8
Signed-off-by: Jim Hahn <jrh3@att.com>
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)
);
}