test_class.file: org.eclipse.winery.model.tosca/src/test/java/org/eclipse/winery/model/tosca/utils/RemoveEmptyListsTest.java
test_class.identifier: RemoveEmptyListsTest
test_case.body: @Test
      public void emptyPropertiesAndPoliciesListsRemovedFromNodeTemplate() {
          TTopologyTemplate topologyTemplate = new TTopologyTemplate();
          TNodeTemplate nodeTemplate = new TNodeTemplate();
          topologyTemplate.getNodeTemplateOrRelationshipTemplate().add(nodeTemplate);
  
          nodeTemplate.setProperties(new TEntityTemplate.Properties());
          nodeTemplate.setPolicies(new TPolicies());
  
          assertNotNull(((TNodeTemplate) topologyTemplate.getNodeTemplateOrRelationshipTemplate().get(0)).getPolicies());
          assertNotNull(((TNodeTemplate) topologyTemplate.getNodeTemplateOrRelationshipTemplate().get(0)).getProperties());
          // preconditions fulfilled
  
          RemoveEmptyLists removeEmptyLists = new RemoveEmptyLists();
          removeEmptyLists.removeEmptyLists(topologyTemplate);
          
          assertNull(((TNodeTemplate) topologyTemplate.getNodeTemplateOrRelationshipTemplate().get(0)).getPolicies());
          assertNull(((TNodeTemplate) topologyTemplate.getNodeTemplateOrRelationshipTemplate().get(0)).getProperties());
      }
test_case.class_method_signature: RemoveEmptyListsTest.emptyPropertiesAndPoliciesListsRemovedFromNodeTemplate()
test_case.full_signature: @Test public void emptyPropertiesAndPoliciesListsRemovedFromNodeTemplate()
test_case.identifier: emptyPropertiesAndPoliciesListsRemovedFromNodeTemplate
test_case.invocations: add getNodeTemplateOrRelationshipTemplate setProperties setPolicies assertNotNull getPolicies get getNodeTemplateOrRelationshipTemplate assertNotNull getProperties get getNodeTemplateOrRelationshipTemplate removeEmptyLists assertNull getPolicies get getNodeTemplateOrRelationshipTemplate assertNull getProperties get getNodeTemplateOrRelationshipTemplate
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void emptyPropertiesAndPoliciesListsRemovedFromNodeTemplate()
focal_class.file: org.eclipse.winery.model.tosca/src/main/java/org/eclipse/winery/model/tosca/utils/RemoveEmptyLists.java
focal_class.identifier: RemoveEmptyLists
focal_class.class_method_signature: RemoveEmptyLists.visit(TEntityTemplate entityTemplate)
focal_class.full_signature: @Override public void visit(TEntityTemplate entityTemplate)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (TEntityTemplate entityTemplate)
focal_class.return: void
focal_class.signature: void visit(TEntityTemplate entityTemplate)
focal_class.class_method_signature: RemoveEmptyLists.visit(TNodeTemplate nodeTemplate)
focal_class.full_signature: @Override public void visit(TNodeTemplate nodeTemplate)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (TNodeTemplate nodeTemplate)
focal_class.return: void
focal_class.signature: void visit(TNodeTemplate nodeTemplate)
focal_class.class_method_signature: RemoveEmptyLists.visit(TRelationshipTemplate relationshipTemplate)
focal_class.full_signature: @Override public void visit(TRelationshipTemplate relationshipTemplate)
focal_class.identifier: visit
focal_class.modifiers: @Override public
focal_class.parameters: (TRelationshipTemplate relationshipTemplate)
focal_class.return: void
focal_class.signature: void visit(TRelationshipTemplate relationshipTemplate)
focal_class.class_method_signature: RemoveEmptyLists.removeEmptyLists(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public void removeEmptyLists(TTopologyTemplate topologyTemplate)
focal_class.identifier: removeEmptyLists
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: void
focal_class.signature: void removeEmptyLists(TTopologyTemplate topologyTemplate)
focal_class.superclass: extends Visitor
focal_method.body: public void removeEmptyLists(TTopologyTemplate topologyTemplate) {
          final TPolicies policies = topologyTemplate.getPolicies();
          if ((policies != null) && policies.getPolicy().isEmpty()) {
              topologyTemplate.setPolicies(null);
          }
          this.visit(topologyTemplate);
      }
focal_method.class_method_signature: RemoveEmptyLists.removeEmptyLists(TTopologyTemplate topologyTemplate)
focal_method.full_signature: public void removeEmptyLists(TTopologyTemplate topologyTemplate)
focal_method.identifier: removeEmptyLists
focal_method.invocations: getPolicies isEmpty getPolicy setPolicies visit
focal_method.modifiers: public
focal_method.parameters: (TTopologyTemplate topologyTemplate)
focal_method.return: void
focal_method.signature: void removeEmptyLists(TTopologyTemplate topologyTemplate)