Merge "Add SO VF Module Delete Operation"
[policy/models.git] / models-tosca / src / test / java / org / onap / policy / models / tosca / legacy / mapping / LegacyGuardPolicyMapperTest.java
index 6d32c6d..332552a 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ *  Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import static org.junit.Assert.assertEquals;
 
 import java.util.LinkedHashMap;
 import java.util.Map;
+
 import org.junit.Test;
 import org.onap.policy.models.base.PfConceptKey;
 import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicyOutput;
@@ -49,11 +50,13 @@ public class LegacyGuardPolicyMapperTest {
         JpaToscaPolicy policy = new JpaToscaPolicy(new PfConceptKey("PolicyName", "2.0.0"));
         serviceTemplate.getTopologyTemplate().getPolicies().getConceptMap().put(policy.getKey(), policy);
 
+        policy.setMetadata(null);
         assertThatThrownBy(() -> {
             new LegacyGuardPolicyMapper().fromToscaServiceTemplate(serviceTemplate);
         }).hasMessageContaining("no metadata defined on TOSCA policy");
 
         policy.setMetadata(new LinkedHashMap<>());
+        policy.setProperties(null);
         assertThatThrownBy(() -> {
             new LegacyGuardPolicyMapper().fromToscaServiceTemplate(serviceTemplate);
         }).hasMessageContaining("no properties defined on TOSCA policy");