From 05506483dff28c491522beeaaea0f6904077e3ed Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 29 Jun 2020 14:13:14 -0400 Subject: Fix issues in xacml-pdp for new sonar rules Addressed issues reported due to updates to the sonar rules: - invoke only one method in a junit lambda - complete the assertion - use assertThat().exists(), canRead(), etc. Issue-ID: POLICY-2681 Change-Id: I2935f4d0295244ab3b11a57a3bc401c64b695fd1 Signed-off-by: Jim Hahn --- .../policy/xacml/pdp/application/nativ/NativePdpApplicationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'applications/native/src/test/java') diff --git a/applications/native/src/test/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTest.java b/applications/native/src/test/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTest.java index a11c1b14..f434e80f 100644 --- a/applications/native/src/test/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTest.java +++ b/applications/native/src/test/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTest.java @@ -220,7 +220,7 @@ public class NativePdpApplicationTest { assertThat(response).isNotNull(); Decision decision = response.getResults().iterator().next().getDecision(); assertThat(decision).isNotNull(); - assertThat(decision.toString()).isEqualTo(expected); + assertThat(decision).hasToString(expected); LOGGER.info("Xacml response we received {}", DOMResponse.toString(response)); } } \ No newline at end of file -- cgit 1.2.3-korg