- assertThat(subMappingCapabilities.get("capability").get(0), is("VNF1"));
- assertThat(subMappingCapabilities.get("capability").get(1), is("capability1"));
- @SuppressWarnings("unchecked") final Map<String, Object> nodeTemplates = (Map<String, Object>) topologyTemplate.get("node_templates");
- @SuppressWarnings("unchecked") final Map<String, Object> nodeTemplate = (Map<String, Object>) nodeTemplates.get(VNFD_AMF_NODE_NAME);
- assertThat("capabilities should be null", nodeTemplate.get("capabilities"), is(nullValue()));
+ assertNull(subMappingCapabilities);
+
+ final Map<String, Object> topologyInputs = (Map<String, Object>) topologyTemplate.get("inputs");
+ assertTrue(topologyInputs.containsKey("other_property"));
+ assertEquals(1, topologyInputs.size());
+
+ final Map<String, Object> nodeTemplates = (Map<String, Object>) ((Map<String, Object>) topologyTemplate.get("node_templates"));
+ final Map<String, Object> nodeTemplateVnfd = (Map<String, Object>) ((Map<String, Object>) nodeTemplates.get(VNFD_AMF_NODE_NAME));
+ final Map<String, Object> nodeTemplateProperties = (Map<String, Object>) ((Map<String, Object>) nodeTemplateVnfd.get("properties"));
+ assertTrue(nodeTemplateProperties.containsKey("will_not_be_excluded"));
+
+ final Map<String, Object> nodeType = (Map<String, Object>) ((Map<String, Object>) toscaTemplateYaml.get("node_types")).get(nsNodeTypeName);
+ assertTrue(((List<Map<String, Map>>)nodeType.get("requirements")).get(0).containsKey("VNF1" + DOT + VIRTUAL_LINK_REQUIREMENT_NAME));
+ assertFalse(((List<Map<String, Map>>)nodeType.get("requirements")).get(0).containsKey("VNF1" + DOT + VIRTUAL_BINDING_REQUIREMENT_NAME));
+
+ assertEquals(5, ((Map<String, Map>)nodeType.get("properties")).size());
+ for (final Entry<String, Map> property: ((Map<String, Map>)nodeType.get("properties")).entrySet()) {
+ if (property.getKey().equals("other_property")) {
+ assertNull(property.getValue().get("constraints"));
+ } else {
+ assertEquals(1, ((List<Map>)property.getValue().get("constraints")).size());
+ }
+ }
+