summaryrefslogtreecommitdiffstats
path: root/applications/common/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'applications/common/src/test')
-rw-r--r--applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java
index 6139a528..e7ea049a 100644
--- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java
+++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java
@@ -190,10 +190,10 @@ public class StdXacmlApplicationServiceProviderTest {
}
@Test
- public void testLoadPolicy_ConversionError() throws ToscaPolicyConversionException {
+ public void testLoadPolicy_ConversionError() throws XacmlApplicationException, ToscaPolicyConversionException {
when(trans.convertPolicy(policy)).thenReturn(null);
- assertFalse(prov.loadPolicy(policy));
+ assertThatThrownBy(() -> prov.loadPolicy(policy)).isInstanceOf(XacmlApplicationException.class);
}
@Test
@@ -203,7 +203,8 @@ public class StdXacmlApplicationServiceProviderTest {
final Set<String> set = XACMLProperties.getRootPolicyIDs(prov.getProperties());
- assertTrue(prov.loadPolicy(policy));
+ // Load policy
+ prov.loadPolicy(policy);
// policy file should have been created
File policyFile = new File(TEMP_DIR, "my-name_1.2.3.xml");