summaryrefslogtreecommitdiffstats
path: root/applications/common
diff options
context:
space:
mode:
Diffstat (limited to 'applications/common')
-rw-r--r--applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslatorTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslatorTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslatorTest.java
index 93124552..6ff7a7f1 100644
--- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslatorTest.java
+++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdCombinedPolicyResultsTranslatorTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -123,6 +123,10 @@ public class StdCombinedPolicyResultsTranslatorTest {
public void testConvert() throws ToscaPolicyConversionException, CoderException {
StdCombinedPolicyResultsTranslator translator = new StdCombinedPolicyResultsTranslator();
+ assertThatThrownBy(() -> translator.convertPolicy(null)).isInstanceOf(ToscaPolicyConversionException.class)
+ .hasMessageContaining("Cannot convert a NULL policy");
+
+
assertThatThrownBy(() -> translator.convertPolicy(
new ToscaPolicy())).isInstanceOf(ToscaPolicyConversionException.class)
.hasMessageContaining("missing metadata");