diff options
author | 2022-07-06 14:25:55 -0500 | |
---|---|---|
committer | 2022-07-07 09:27:27 -0500 | |
commit | b4a2d052d48dc72059738c2aaabe46da375500a2 (patch) | |
tree | 0aa6848d8b4da1fa46a845649e751a79cfdd7196 /main/src/test/java | |
parent | e73152c451ae780422af7a153a6b497309624dd2 (diff) |
Fix Raw XACML Decision API Serialization
Issue-ID: POLICY-4274
Signed-off-by: dc443y <dc443y@att.com>
Change-Id: I0d367d35e7ec52c7587ec75194b654cc41303868
Signed-off-by: dc443y <dc443y@att.com>
Diffstat (limited to 'main/src/test/java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java index fb7d7179..b369ad31 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -201,11 +201,11 @@ public class TestDecision { String responseFromXmlRequest = getNativeDecision(xmlRequestAsString, APPLICATION_XACML_XML); LOGGER.info("Response from xml request {}", responseFromXmlRequest); - assertThat(responseFromXmlRequest).contains("NOTAPPLICABLE"); + assertThat(responseFromXmlRequest).contains("<Response xmlns=").contains("NotApplicable"); String responseFromJsonRequest = getNativeDecision(jsonRequestAsString, APPLICATION_XACML_JSON); LOGGER.info("Response from json request {}", responseFromJsonRequest); - assertThat(responseFromJsonRequest).contains("NOTAPPLICABLE"); + assertThat(responseFromJsonRequest).contains("\"Response\":").contains("NotApplicable"); } private static Main startXacmlPdpService(File params) throws PolicyXacmlPdpException { @@ -228,7 +228,7 @@ public class TestDecision { private String getNativeDecision(String request, String mediaType) { Entity<String> entityRequest = Entity.entity(request, mediaType); - Response response = client.post("/xacml", entityRequest, Collections.emptyMap()); + Response response = client.post("/xacml", entityRequest, Map.of("Accept", mediaType)); assertEquals(200, response.getStatus()); |