diff options
Diffstat (limited to 'models-tosca/src/test')
-rw-r--r-- | models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/mapping/LegacyGuardPolicyMapperTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/mapping/LegacyGuardPolicyMapperTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/mapping/LegacyGuardPolicyMapperTest.java index b1dac8f20..f2fb53d60 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/mapping/LegacyGuardPolicyMapperTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/mapping/LegacyGuardPolicyMapperTest.java @@ -22,6 +22,8 @@ package org.onap.policy.models.tosca.legacy.mapping; import static org.assertj.core.api.Assertions.assertThatThrownBy; +import java.util.LinkedHashMap; + import org.junit.Test; import org.onap.policy.models.base.PfConceptKey; import org.onap.policy.models.tosca.simple.concepts.JpaToscaPolicies; @@ -47,6 +49,11 @@ public class LegacyGuardPolicyMapperTest { assertThatThrownBy(() -> { new LegacyGuardPolicyMapper().fromToscaServiceTemplate(serviceTemplate); + }).hasMessageContaining("no metadata defined on TOSCA policy"); + + policy.setMetadata(new LinkedHashMap<>()); + assertThatThrownBy(() -> { + new LegacyGuardPolicyMapper().fromToscaServiceTemplate(serviceTemplate); }).hasMessageContaining("no properties defined on TOSCA policy"); } } |