diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdCsarManifestBuilder.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdCsarManifestBuilder.java
index ed3a7fc..38f03f1 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdCsarManifestBuilder.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdCsarManifestBuilder.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.builder;
 
 import java.time.ZonedDateTime;
@@ -30,19 +30,18 @@
  * Builder for the manifest (.mf) file in a NSD CSAR
  */
 public class NsdCsarManifestBuilder {
+
     static final String METADATA = "metadata";
     static final String SOURCE = "Source";
     static final String COMPATIBLE_SPECIFICATION_VERSIONS = "compatible_specification_versions";
+    static final String NSD_RELEASE_DATE_TIME = "nsd_release_date_time";
+    static final String ATTRIBUTE_SEPARATOR = ": ";
     private static final String NSD_DESIGNER = "nsd_designer";
     private static final String NSD_FILE_STRUCTURE_VERSION = "nsd_file_structure_version";
-    static final String NSD_RELEASE_DATE_TIME = "nsd_release_date_time";
     private static final String NSD_NAME = "nsd_name";
     private static final String NSD_INVARIANT_ID = "nsd_invariant_id";
-    static final String ATTRIBUTE_SEPARATOR = ": ";
     private static final String NEW_LINE = "\n";
-    private static final DateTimeFormatter RFC_3339_DATE_TIME_FORMATTER =
-        DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ");
-
+    private static final DateTimeFormatter RFC_3339_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ");
     private final MetadataHeader metadataHeader;
     private final Set<String> sources;
     private final Set<String> compatibleSpecificationVersions;
@@ -137,21 +136,13 @@
         appendEntry(metadataBuilder, NSD_FILE_STRUCTURE_VERSION, metadataHeader.fileStructureVersion);
         final StringBuilder sourceBuilder = new StringBuilder();
         sources.forEach(source -> appendEntry(sourceBuilder, SOURCE, source));
-
         final StringBuilder compatibleSpecificationVersionsBuilder = new StringBuilder();
         if (!compatibleSpecificationVersions.isEmpty()) {
-            compatibleSpecificationVersionsBuilder.append(COMPATIBLE_SPECIFICATION_VERSIONS)
-                .append(ATTRIBUTE_SEPARATOR)
-                .append(String.join(",", compatibleSpecificationVersions))
-                .append(NEW_LINE);
+            compatibleSpecificationVersionsBuilder.append(COMPATIBLE_SPECIFICATION_VERSIONS).append(ATTRIBUTE_SEPARATOR)
+                .append(String.join(",", compatibleSpecificationVersions)).append(NEW_LINE);
         }
-
         final StringBuilder builder = new StringBuilder();
-
-        builder.append(metadataBuilder)
-            .append(compatibleSpecificationVersionsBuilder)
-            .append(NEW_LINE)
-            .append(sourceBuilder);
+        builder.append(metadataBuilder).append(compatibleSpecificationVersionsBuilder).append(NEW_LINE).append(sourceBuilder);
         return builder.toString();
     }
 
@@ -167,17 +158,16 @@
 
     private void appendEntry(final StringBuilder builder, final String entry, final String value) {
         if (value != null) {
-            builder.append(entry).append(ATTRIBUTE_SEPARATOR).append(value)
-                .append(NEW_LINE);
+            builder.append(entry).append(ATTRIBUTE_SEPARATOR).append(value).append(NEW_LINE);
         }
     }
 
     private class MetadataHeader {
+
         private String fileStructureVersion;
         private String nsdName;
         private String nsdReleaseDateTime;
         private String designer;
         private String invariantId;
     }
-
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdToscaMetadataBuilder.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdToscaMetadataBuilder.java
index e709993..64f0b9f 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdToscaMetadataBuilder.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdToscaMetadataBuilder.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.builder;
 
 /**
@@ -30,10 +30,8 @@
     public static final String ENTRY_DEFINITIONS = "Entry-Definitions";
     public static final String ETSI_ENTRY_CHANGE_LOG = "ETSI-Entry-Change-Log";
     public static final String ETSI_ENTRY_MANIFEST = "ETSI-Entry-Manifest";
-
     private static final String ATTRIBUTE_SEPARATOR = ": ";
     private static final String NEW_LINE = "\n";
-
     private final StringBuilder builder = new StringBuilder();
     private String csarVersion;
     private String createdBy;
@@ -125,9 +123,7 @@
 
     private void appendEntry(final String entry, final String value) {
         if (value != null) {
-            builder.append(entry).append(ATTRIBUTE_SEPARATOR).append(value)
-                .append(NEW_LINE);
+            builder.append(entry).append(ATTRIBUTE_SEPARATOR).append(value).append(NEW_LINE);
         }
     }
-
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/exception/NsdException.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/exception/NsdException.java
index 2483b2e..d7b70fe 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/exception/NsdException.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/exception/NsdException.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.exception;
 
 /**
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/exception/VnfDescriptorException.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/exception/VnfDescriptorException.java
index e4f966f..45038e3 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/exception/VnfDescriptorException.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/exception/VnfDescriptorException.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.exception;
 
 /**
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/factory/EtsiNfvNsdCsarGeneratorFactory.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/factory/EtsiNfvNsdCsarGeneratorFactory.java
index c1c792e..fb08f56 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/factory/EtsiNfvNsdCsarGeneratorFactory.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/factory/EtsiNfvNsdCsarGeneratorFactory.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
@@ -16,15 +17,14 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.factory;
 
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.EtsiNfvNsdCsarGenerator;
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.EtsiNfvNsdCsarGeneratorImpl;
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.VnfDescriptorGenerator;
-import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config.NsDescriptorConfig;
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config.EtsiVersion;
+import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config.NsDescriptorConfig;
 import org.springframework.beans.factory.ObjectProvider;
 import org.springframework.stereotype.Component;
 
@@ -51,5 +51,4 @@
         return etsiNfvNsdCsarGeneratorObjectProvider
             .getObject(nsDescriptorConfig, vnfDescriptorGenerator, nsDescriptorGeneratorFactory, artifactCassandraDao);
     }
-
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/factory/NsDescriptorGeneratorFactory.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/factory/NsDescriptorGeneratorFactory.java
index 5563078..10dee99 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/factory/NsDescriptorGeneratorFactory.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/factory/NsDescriptorGeneratorFactory.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.factory;
 
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.NsDescriptorGenerator;
@@ -42,8 +42,6 @@
     }
 
     public NsDescriptorGenerator create() {
-        return nsDescriptorGeneratorProvider
-            .getObject(toscaExportHandler, toscaTemplateYamlGeneratorProvider);
+        return nsDescriptorGeneratorProvider.getObject(toscaExportHandler, toscaTemplateYamlGeneratorProvider);
     }
-
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsCsarEntryGenerator.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsCsarEntryGenerator.java
index ff20a3e..90359a5 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsCsarEntryGenerator.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsCsarEntryGenerator.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import static org.openecomp.sdc.common.api.ArtifactTypeEnum.ETSI_PACKAGE;
@@ -39,11 +39,10 @@
 @org.springframework.stereotype.Component("etsiNfvNsCsarEntryGenerator")
 public class EtsiNfvNsCsarEntryGenerator implements CsarEntryGenerator {
 
-    private static final Logger LOGGER = LoggerFactory.getLogger(EtsiNfvNsCsarEntryGenerator.class);
     static final String ETSI_NS_COMPONENT_CATEGORY = "ETSI NFV Network Service";
     static final String NSD_FILE_PATH_FORMAT = "Artifacts/%s/%s.csar";
     static final String ETSI_VERSION_METADATA = "ETSI Version";
-
+    private static final Logger LOGGER = LoggerFactory.getLogger(EtsiNfvNsCsarEntryGenerator.class);
     private final EtsiNfvNsdCsarGeneratorFactory etsiNfvNsdCsarGeneratorFactory;
 
     public EtsiNfvNsCsarEntryGenerator(final EtsiNfvNsdCsarGeneratorFactory etsiNfvNsdCsarGeneratorFactory) {
@@ -51,8 +50,8 @@
     }
 
     /**
-     * Generates a Network Service CSAR based on a SERVICE component of category {@link
-     * EtsiNfvNsCsarEntryGenerator#ETSI_NS_COMPONENT_CATEGORY} and wraps it in a SDC CSAR entry.
+     * Generates a Network Service CSAR based on a SERVICE component of category {@link EtsiNfvNsCsarEntryGenerator#ETSI_NS_COMPONENT_CATEGORY} and
+     * wraps it in a SDC CSAR entry.
      *
      * @param component the component to create the NS CSAR from
      * @return an entry to be added in the Component CSAR by SDC
@@ -64,31 +63,24 @@
             LOGGER.debug("Ignoring NSD CSAR generation for component '{}' as it is not a SERVICE", componentName);
             return Collections.emptyMap();
         }
-
-        final boolean isEOTemplate = component.getCategories().stream()
-            .anyMatch(category -> ETSI_NS_COMPONENT_CATEGORY.equals(category.getName()));
+        final boolean isEOTemplate = component.getCategories().stream().anyMatch(category -> ETSI_NS_COMPONENT_CATEGORY.equals(category.getName()));
         if (!isEOTemplate) {
-            LOGGER.debug("Ignoring NSD CSAR generation for component '{}' as it does not belong to the category '{}'",
-                componentName, ETSI_NS_COMPONENT_CATEGORY);
+            LOGGER.debug("Ignoring NSD CSAR generation for component '{}' as it does not belong to the category '{}'", componentName,
+                ETSI_NS_COMPONENT_CATEGORY);
             return Collections.emptyMap();
         }
-
         final byte[] nsdCsar;
         try {
             final EtsiVersion etsiVersion = getComponentEtsiVersion(component);
-            final EtsiNfvNsdCsarGenerator etsiNfvNsdCsarGenerator =
-                etsiNfvNsdCsarGeneratorFactory.create(etsiVersion);
+            final EtsiNfvNsdCsarGenerator etsiNfvNsdCsarGenerator = etsiNfvNsdCsarGeneratorFactory.create(etsiVersion);
             nsdCsar = etsiNfvNsdCsarGenerator.generateNsdCsar(component);
         } catch (final NsdException e) {
-            LOGGER.error("Could not create NSD CSAR entry for component '{}'"
-                , component.getName(), e);
+            LOGGER.error("Could not create NSD CSAR entry for component '{}'", component.getName(), e);
             return Collections.emptyMap();
         } catch (final Exception e) {
-            LOGGER.error("Could not create NSD CSAR entry for component '{}'. An unexpected exception occurred"
-                , component.getName(), e);
+            LOGGER.error("Could not create NSD CSAR entry for component '{}'. An unexpected exception occurred", component.getName(), e);
             return Collections.emptyMap();
         }
-
         return createEntry(component.getNormalizedName(), nsdCsar);
     }
 
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGenerator.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGenerator.java
index f9ee55e..072c4c5 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGenerator.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGenerator.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import org.openecomp.sdc.be.model.Component;
@@ -34,5 +34,4 @@
      * @return the CSAR package content
      */
     byte[] generateNsdCsar(Component component) throws NsdException;
-
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImpl.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImpl.java
index efc6ade..e7d3019 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImpl.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImpl.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import static org.openecomp.sdc.common.api.ArtifactTypeEnum.ETSI_PACKAGE;
@@ -71,22 +71,18 @@
 public class EtsiNfvNsdCsarGeneratorImpl implements EtsiNfvNsdCsarGenerator {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(EtsiNfvNsdCsarGeneratorImpl.class);
-
     private static final String MANIFEST_EXT = "mf";
     private static final String SLASH = "/";
     private static final String DOT = ".";
     private static final String DOT_YAML = DOT + "yaml";
-
     private static final String DEFINITION = "Definitions";
     private static final String TOSCA_META_PATH = "TOSCA-Metadata/TOSCA.meta";
-
     private final VnfDescriptorGenerator vnfDescriptorGenerator;
     private final NsDescriptorGeneratorFactory nsDescriptorGeneratorFactory;
     private final ArtifactCassandraDao artifactCassandraDao;
     private final NsDescriptorConfig nsDescriptorConfig;
 
-    public EtsiNfvNsdCsarGeneratorImpl(final NsDescriptorConfig nsDescriptorConfig,
-                                       final VnfDescriptorGenerator vnfDescriptorGenerator,
+    public EtsiNfvNsdCsarGeneratorImpl(final NsDescriptorConfig nsDescriptorConfig, final VnfDescriptorGenerator vnfDescriptorGenerator,
                                        final NsDescriptorGeneratorFactory nsDescriptorGeneratorFactory,
                                        final ArtifactCassandraDao artifactCassandraDao) {
         this.nsDescriptorConfig = nsDescriptorConfig;
@@ -100,19 +96,14 @@
         if (component == null) {
             throw new NsdException("Could not generate the NSD CSAR, invalid component argument");
         }
-
         loadComponentArtifacts(component);
         loadComponentInstancesArtifacts(component);
-
         final String componentName = component.getName();
-
         try {
             LOGGER.debug("Starting NSD CSAR generation for component '{}'", componentName);
             final Map<String, byte[]> nsdCsarFiles = new HashMap<>();
-
             final List<VnfDescriptor> vnfDescriptorList = generateVnfPackages(component);
             vnfDescriptorList.forEach(vnfPackage -> nsdCsarFiles.putAll(vnfPackage.getDefinitionFiles()));
-
             final String nsdFileName = getNsdFileName(component);
             final EtsiVersion etsiVersion = nsDescriptorConfig.getNsVersion();
             final Nsd nsd = generateNsd(component, vnfDescriptorList);
@@ -120,13 +111,10 @@
             nsdCsarFiles.put(TOSCA_META_PATH, buildToscaMetaContent(nsdFileName).getBytes());
             addEtsiSolNsdTypes(etsiVersion, nsdCsarFiles);
             for (final String referencedFile : nsd.getArtifactReferences()) {
-                getReferencedArtifact(component, referencedFile).ifPresent(
-                    artifactDefinition -> nsdCsarFiles.put(referencedFile, artifactDefinition.getPayloadData())
-                );
+                getReferencedArtifact(component, referencedFile)
+                    .ifPresent(artifactDefinition -> nsdCsarFiles.put(referencedFile, artifactDefinition.getPayloadData()));
             }
-            nsdCsarFiles
-                .put(getManifestPath(nsdFileName), getManifestFileContent(nsd, etsiVersion, nsdCsarFiles.keySet()).getBytes());
-
+            nsdCsarFiles.put(getManifestPath(nsdFileName), getManifestFileContent(nsd, etsiVersion, nsdCsarFiles.keySet()).getBytes());
             final byte[] csar = buildCsarPackage(nsdCsarFiles);
             LOGGER.debug("Successfully generated NSD CSAR package");
             return csar;
@@ -147,8 +135,7 @@
                 if (artifactPayload.isPresent()) {
                     artifactDefinition.setPayload(artifactPayload.get());
                 } else {
-                    LOGGER.warn("Could not load component '{}' artifact '{}'",
-                        component.getName(), artifactDefinition.getArtifactName());
+                    LOGGER.warn("Could not load component '{}' artifact '{}'", component.getName(), artifactDefinition.getArtifactName());
                 }
             }
         });
@@ -164,15 +151,14 @@
             if (MapUtils.isEmpty(deploymentArtifacts)) {
                 continue;
             }
-            deploymentArtifacts.values().stream()
-                .filter(artifactDefinition -> StringUtils.isNotEmpty(artifactDefinition.getEsId()))
+            deploymentArtifacts.values().stream().filter(artifactDefinition -> StringUtils.isNotEmpty(artifactDefinition.getEsId()))
                 .forEach(artifactDefinition -> {
                     final Optional<byte[]> artifactPayload = loadArtifactPayload(artifactDefinition.getEsId());
                     if (artifactPayload.isPresent()) {
                         artifactDefinition.setPayload(artifactPayload.get());
                     } else {
-                        LOGGER.warn("Could not load component '{}' instance '{}' artifact '{}'",
-                            component.getName(), componentInstance.getName(), artifactDefinition.getArtifactName());
+                        LOGGER.warn("Could not load component '{}' instance '{}' artifact '{}'", component.getName(), componentInstance.getName(),
+                            artifactDefinition.getArtifactName());
                     }
                 });
         }
@@ -184,34 +170,27 @@
             LOGGER.warn("Could not find any instance in service '{}'", component.getName());
             return Collections.emptyList();
         }
-
         final List<VnfDescriptor> vnfDescriptorList = new ArrayList<>();
         for (final ComponentInstance componentInstance : componentInstanceList) {
             final String componentInstanceName = componentInstance.getName();
             final ArtifactDefinition onboardedCsarArtifact = findOnboardedCsar(componentInstance).orElse(null);
             if (onboardedCsarArtifact == null) {
-                LOGGER.warn(
-                    "Unable to generate VNF Package for component instance '{}', no onboarded package present",
-                    componentInstanceName);
+                LOGGER.warn("Unable to generate VNF Package for component instance '{}', no onboarded package present", componentInstanceName);
                 continue;
             }
             final Optional<VnfDescriptor> vnfPackage;
             try {
                 vnfPackage = vnfDescriptorGenerator.generate(componentInstanceName, onboardedCsarArtifact);
             } catch (final Exception e) {
-                final String errorMsg =
-                    String.format("Could not generate VNF package for component instance %s", componentInstanceName);
+                final String errorMsg = String.format("Could not generate VNF package for component instance %s", componentInstanceName);
                 throw new NsdException(errorMsg, e);
             }
             if (vnfPackage.isPresent()) {
                 vnfDescriptorList.add(vnfPackage.get());
             } else {
-                LOGGER.warn(
-                    "Unable to generate VNF Package for component instance '{}', no onboarded package present",
-                    componentInstanceName);
+                LOGGER.warn("Unable to generate VNF Package for component instance '{}', no onboarded package present", componentInstanceName);
             }
         }
-
         return vnfDescriptorList;
     }
 
@@ -220,23 +199,15 @@
         if (artifactDefinitionMap == null || artifactDefinitionMap.isEmpty()) {
             return Optional.empty();
         }
-        return artifactDefinitionMap.values()
-            .stream()
-            .filter(artifactDefinition -> {
-                final String artifactType = (String) artifactDefinition
-                    .getToscaPresentationValue(JsonPresentationFields.ARTIFACT_TYPE);
-                return ONBOARDED_PACKAGE.getType().equals(artifactType) || ETSI_PACKAGE.getType().equals(artifactType);
-            })
-            .findFirst();
+        return artifactDefinitionMap.values().stream().filter(artifactDefinition -> {
+            final String artifactType = (String) artifactDefinition.getToscaPresentationValue(JsonPresentationFields.ARTIFACT_TYPE);
+            return ONBOARDED_PACKAGE.getType().equals(artifactType) || ETSI_PACKAGE.getType().equals(artifactType);
+        }).findFirst();
     }
 
-    private void addEtsiSolNsdTypes(final EtsiVersion etsiVersion,
-                                    final Map<String, byte[]> nsdCsarFileMap) {
-        final EtsiVersion currentVersion = etsiVersion == null ?
-            EtsiVersion.getDefaultVersion() : etsiVersion;
-
+    private void addEtsiSolNsdTypes(final EtsiVersion etsiVersion, final Map<String, byte[]> nsdCsarFileMap) {
+        final EtsiVersion currentVersion = etsiVersion == null ? EtsiVersion.getDefaultVersion() : etsiVersion;
         final PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
-
         try {
             final Resource[] resources =
                 resolver.getResources(String.format("classpath:etsi-nfv-types/%s/*.*", currentVersion.getVersion()));
@@ -388,3 +359,5 @@
     }
 
 }
+
+
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGenerator.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGenerator.java
index d36757c..726a5e1 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGenerator.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGenerator.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import java.util.List;
@@ -31,7 +31,7 @@
     /**
      * Generates the TOSCA Network Service Descriptor (NSD) based on a SERVICE SDC component and its VNF instances.
      *
-     * @param component the SERVICE component
+     * @param component         the SERVICE component
      * @param vnfDescriptorList the VNF instances
      * @return a NSD representation
      */
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGeneratorImpl.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGeneratorImpl.java
index 2a2e2b0..62f8e25 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGeneratorImpl.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGeneratorImpl.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import com.google.common.collect.ImmutableMap;
@@ -63,15 +63,14 @@
     private static final Logger LOGGER = LoggerFactory.getLogger(NsDescriptorGeneratorImpl.class);
     private static final String TOSCA_VERSION = "tosca_simple_yaml_1_1";
     private static final String NS_TOSCA_TYPE = "tosca.nodes.nfv.NS";
-    private static final List<Map<String, Map<String, String>>> DEFAULT_IMPORTS = ConfigurationManager
-        .getConfigurationManager().getConfiguration().getDefaultImports();
+    private static final List<Map<String, Map<String, String>>> DEFAULT_IMPORTS = ConfigurationManager.getConfigurationManager().getConfiguration()
+        .getDefaultImports();
     private static final List<String> PROPERTIES_TO_EXCLUDE_FROM_ETSI_SOL_NSD_NS_NODE_TYPE = Arrays
         .asList("cds_model_name", "cds_model_version", "skip_post_instantiation_configuration", "controller_actor");
     private static final List<String> PROPERTIES_TO_EXCLUDE_FROM_ETSI_SOL_NSD_NS_NODE_TEMPLATE = Arrays
-        .asList("nf_function", "nf_role", "nf_naming_code", "nf_type", "nf_naming", "availability_zone_max_count",
-            "min_instances", "max_instances", "multi_stage_design", "sdnc_model_name", "sdnc_model_version",
-            "sdnc_artifact_name", "skip_post_instantiation_configuration", "controller_actor");
-
+        .asList("nf_function", "nf_role", "nf_naming_code", "nf_type", "nf_naming", "availability_zone_max_count", "min_instances", "max_instances",
+            "multi_stage_design", "sdnc_model_name", "sdnc_model_version", "sdnc_artifact_name", "skip_post_instantiation_configuration",
+            "controller_actor");
     private final ToscaExportHandler toscaExportHandler;
     private final ObjectProvider<ToscaTemplateYamlGenerator> toscaTemplateYamlGeneratorProvider;
 
@@ -81,19 +80,16 @@
         this.toscaTemplateYamlGeneratorProvider = toscaTemplateYamlGeneratorProvider;
     }
 
-    public Optional<Nsd> generate(final Component component,
-                                  final List<VnfDescriptor> vnfDescriptorList) throws NsdException {
+    public Optional<Nsd> generate(final Component component, final List<VnfDescriptor> vnfDescriptorList) throws NsdException {
         if (!ComponentTypeEnum.SERVICE.equals(component.getComponentType())) {
             return Optional.empty();
         }
-
         final ToscaTemplate toscaTemplate = createNetworkServiceDescriptor(component, vnfDescriptorList);
         final ToscaNodeType nsNodeType = toscaTemplate.getNode_types().values().stream()
             .filter(toscaNodeType -> NS_TOSCA_TYPE.equals(toscaNodeType.getDerived_from())).findFirst().orElse(null);
         if (nsNodeType == null) {
             return Optional.empty();
         }
-
         return Optional.of(buildNsd(toscaTemplate, nsNodeType));
     }
 
@@ -103,8 +99,7 @@
         nsd.setVersion(getProperty(nsNodeType, Nsd.VERSION_PROPERTY));
         nsd.setName(getProperty(nsNodeType, Nsd.NAME_PROPERTY));
         nsd.setInvariantId(getProperty(nsNodeType, Nsd.INVARIANT_ID_PROPERTY));
-        final ToscaTemplateYamlGenerator yamlParserProvider =
-            toscaTemplateYamlGeneratorProvider.getObject(toscaTemplate);
+        final ToscaTemplateYamlGenerator yamlParserProvider = toscaTemplateYamlGeneratorProvider.getObject(toscaTemplate);
         final byte[] contents = yamlParserProvider.parseToYamlString().getBytes();
         nsd.setContents(contents);
         final List<String> interfaceImplementations = getInterfaceImplementations(toscaTemplate);
@@ -117,14 +112,10 @@
             return Collections.emptyList();
         }
         final List<String> interfaceImplementations = new ArrayList<>();
-        final Collection<ToscaNodeTemplate> nodeTemplates =
-            template.getTopology_template().getNode_templates().values();
-        nodeTemplates.stream()
-            .filter(toscaNodeTemplate -> toscaNodeTemplate.getInterfaces() != null)
-            .forEach(toscaNodeTemplate ->
-                toscaNodeTemplate.getInterfaces().values().forEach(interfaceInstance ->
-                    interfaceImplementations.addAll(getInterfaceImplementations(interfaceInstance))
-            ));
+        final Collection<ToscaNodeTemplate> nodeTemplates = template.getTopology_template().getNode_templates().values();
+        nodeTemplates.stream().filter(toscaNodeTemplate -> toscaNodeTemplate.getInterfaces() != null).forEach(
+            toscaNodeTemplate -> toscaNodeTemplate.getInterfaces().values()
+                .forEach(interfaceInstance -> interfaceImplementations.addAll(getInterfaceImplementations(interfaceInstance))));
         return interfaceImplementations;
     }
 
@@ -142,78 +133,58 @@
 
     private String getProperty(final ToscaNodeType nodeType, final String propertyName) {
         final ToscaProperty toscaProperty = nodeType.getProperties().get(propertyName);
-
-        final String errorMsg =
-            String.format("Property '%s' must be defined and must have a valid values constraint", propertyName);
+        final String errorMsg = String.format("Property '%s' must be defined and must have a valid values constraint", propertyName);
         final String returnValueOnError = "unknown";
         if (toscaProperty == null || CollectionUtils.isEmpty(toscaProperty.getConstraints())) {
             LOGGER.error(errorMsg);
             return returnValueOnError;
         }
-
         final ToscaPropertyConstraint toscaPropertyConstraint = toscaProperty.getConstraints().get(0);
         if (ConstraintType.VALID_VALUES != toscaPropertyConstraint.getConstraintType()) {
             LOGGER.error(errorMsg);
             return returnValueOnError;
         }
-
-        final ToscaPropertyConstraintValidValues validValuesConstraint =
-            (ToscaPropertyConstraintValidValues) toscaPropertyConstraint;
+        final ToscaPropertyConstraintValidValues validValuesConstraint = (ToscaPropertyConstraintValidValues) toscaPropertyConstraint;
         final List<String> validValues = validValuesConstraint.getValidValues();
-        if(CollectionUtils.isEmpty(validValues)) {
+        if (CollectionUtils.isEmpty(validValues)) {
             LOGGER.error(errorMsg);
             return returnValueOnError;
         }
-
         return validValues.get(0);
     }
 
-    private ToscaTemplate createNetworkServiceDescriptor(final Component component,
-                                                        final List<VnfDescriptor> vnfDescriptorList)
-        throws NsdException {
-
+    private ToscaTemplate createNetworkServiceDescriptor(final Component component, final List<VnfDescriptor> vnfDescriptorList) throws NsdException {
         final ToscaTemplate componentToscaTemplate = parseToToscaTemplate(component);
         final ToscaTemplate componentToscaTemplateInterface = exportComponentInterfaceAsToscaTemplate(component);
-
-        final Entry<String, ToscaNodeType> firstNodeTypeEntry =
-            componentToscaTemplateInterface.getNode_types()
-                .entrySet().stream().findFirst().orElse(null);
+        final Entry<String, ToscaNodeType> firstNodeTypeEntry = componentToscaTemplateInterface.getNode_types().entrySet().stream().findFirst()
+            .orElse(null);
         if (firstNodeTypeEntry == null) {
             throw new NsdException("Could not find abstract Service type");
         }
-
         final String nsNodeTypeName = firstNodeTypeEntry.getKey();
         final ToscaNodeType nsNodeType = firstNodeTypeEntry.getValue();
-
         final Map<String, ToscaNodeType> nodeTypeMap = new HashMap<>();
         nodeTypeMap.put(nsNodeTypeName, createEtsiSolNsNodeType(nsNodeType));
-
         if (componentToscaTemplate.getNode_types() == null) {
             componentToscaTemplate.setNode_types(nodeTypeMap);
         } else {
             componentToscaTemplate.getNode_types().putAll(nodeTypeMap);
         }
-
         setPropertiesForNodeTemplates(componentToscaTemplate);
         removeCapabilitiesFromNodeTemplates(componentToscaTemplate);
         removeOnapPropertiesFromInputs(componentToscaTemplate);
         handleSubstitutionMappings(componentToscaTemplate, nsNodeTypeName);
-
         final Map<String, ToscaNodeTemplate> nodeTemplates = new HashMap<>();
-        nodeTemplates.put(nsNodeTypeName, createNodeTemplateForNsNodeType(nsNodeTypeName,
-            componentToscaTemplateInterface.getNode_types().get(nsNodeTypeName)));
-
+        nodeTemplates.put(nsNodeTypeName,
+            createNodeTemplateForNsNodeType(nsNodeTypeName, componentToscaTemplateInterface.getNode_types().get(nsNodeTypeName)));
         if (componentToscaTemplate.getTopology_template().getNode_templates() == null) {
             componentToscaTemplate.getTopology_template().setNode_templates(nodeTemplates);
         } else {
             setNodeTemplateTypesForVnfs(componentToscaTemplate, vnfDescriptorList);
             componentToscaTemplate.getTopology_template().getNode_templates().putAll(nodeTemplates);
         }
-
         removeOnapMetaData(componentToscaTemplate);
-
         setDefaultImportsForEtsiSolNsNsd(componentToscaTemplate, vnfDescriptorList);
-
         return componentToscaTemplate;
     }
 
@@ -228,8 +199,7 @@
         componentToscaTemplate.getTopology_template().setSubstitution_mappings(substitutionMapping);
     }
 
-    private void setNodeTemplateTypesForVnfs(final ToscaTemplate template,
-                                             final List<VnfDescriptor> vnfDescriptorList) {
+    private void setNodeTemplateTypesForVnfs(final ToscaTemplate template, final List<VnfDescriptor> vnfDescriptorList) {
         if (CollectionUtils.isEmpty(vnfDescriptorList)) {
             return;
         }
@@ -237,11 +207,9 @@
         if (MapUtils.isEmpty(nodeTemplateMap)) {
             return;
         }
-        nodeTemplateMap.forEach((key, toscaNodeTemplate) ->
-            vnfDescriptorList.stream()
-                .filter(vnfDescriptor -> key.equals(vnfDescriptor.getName())).findFirst()
-                .ifPresent(vnfDescriptor -> toscaNodeTemplate.setType(vnfDescriptor.getNodeType()))
-        );
+        nodeTemplateMap.forEach(
+            (key, toscaNodeTemplate) -> vnfDescriptorList.stream().filter(vnfDescriptor -> key.equals(vnfDescriptor.getName())).findFirst()
+                .ifPresent(vnfDescriptor -> toscaNodeTemplate.setType(vnfDescriptor.getNodeType())));
     }
 
     private void setPropertiesForNodeTemplates(final ToscaTemplate template) {
@@ -257,10 +225,9 @@
             }
             final Map<String, Object> editedPropertyMap = new HashMap<>();
             for (final Entry<String, Object> property : propertyMap.entrySet()) {
-                if (!PROPERTIES_TO_EXCLUDE_FROM_ETSI_SOL_NSD_NS_NODE_TEMPLATE.contains(property.getKey())
-                        && propertyIsDefinedInNodeType(property.getKey())) {
-                    editedPropertyMap
-                        .put(property.getKey().substring(property.getKey().indexOf('_') + 1), property.getValue());
+                if (!PROPERTIES_TO_EXCLUDE_FROM_ETSI_SOL_NSD_NS_NODE_TEMPLATE.contains(property.getKey()) && propertyIsDefinedInNodeType(
+                    property.getKey())) {
+                    editedPropertyMap.put(property.getKey().substring(property.getKey().indexOf('_') + 1), property.getValue());
                 }
             }
             if (editedPropertyMap.isEmpty()) {
@@ -270,14 +237,14 @@
             }
         }
     }
-    
+
     private void removeCapabilitiesFromNodeTemplates(final ToscaTemplate template) {
         final Map<String, ToscaNodeTemplate> nodeTemplateMap = template.getTopology_template().getNode_templates();
         if (MapUtils.isEmpty(nodeTemplateMap)) {
             return;
         }
         for (final Entry<String, ToscaNodeTemplate> nodeTemplate : nodeTemplateMap.entrySet()) {
-        	nodeTemplate.getValue().setCapabilities(null);
+            nodeTemplate.getValue().setCapabilities(null);
         }
     }
 
@@ -285,8 +252,7 @@
         final ToscaTopolgyTemplate topologyTemplate = template.getTopology_template();
         final Map<String, ToscaProperty> inputMap = topologyTemplate.getInputs();
         if (MapUtils.isNotEmpty(inputMap)) {
-            inputMap.entrySet()
-                .removeIf(entry -> PROPERTIES_TO_EXCLUDE_FROM_ETSI_SOL_NSD_NS_NODE_TYPE.contains(entry.getKey()));
+            inputMap.entrySet().removeIf(entry -> PROPERTIES_TO_EXCLUDE_FROM_ETSI_SOL_NSD_NS_NODE_TYPE.contains(entry.getKey()));
         }
         if (MapUtils.isEmpty(inputMap)) {
             topologyTemplate.setInputs(null);
@@ -302,8 +268,7 @@
         nodeTemplateMap.values().forEach(toscaNodeTemplate -> toscaNodeTemplate.setMetadata(null));
     }
 
-    private void setDefaultImportsForEtsiSolNsNsd(final ToscaTemplate template,
-                                                  final List<VnfDescriptor> vnfDescriptorList) {
+    private void setDefaultImportsForEtsiSolNsNsd(final ToscaTemplate template, final List<VnfDescriptor> vnfDescriptorList) {
         final List<Map<String, Map<String, String>>> importEntryMap = new ArrayList<>();
         final Map<String, Map<String, String>> defaultImportEntryMap = generateDefaultImportEntry();
         if (MapUtils.isNotEmpty(defaultImportEntryMap)) {
@@ -318,22 +283,17 @@
                 importEntryMap.add(vnfdImportVnfdEntry);
             }
         }
-
         template.setImports(importEntryMap);
     }
 
     private Map<String, Map<String, String>> generateDefaultImportEntry() {
-        return ImmutableMap.of("etsi_nfv_sol001_nsd_types",
-            ImmutableMap.of("file", "etsi_nfv_sol001_nsd_types.yaml")
-        );
+        return ImmutableMap.of("etsi_nfv_sol001_nsd_types", ImmutableMap.of("file", "etsi_nfv_sol001_nsd_types.yaml"));
     }
 
     private ToscaNodeType createEtsiSolNsNodeType(final ToscaNodeType nsNodeType) {
         final ToscaNodeType toscaNodeType = new ToscaNodeType();
         toscaNodeType.setDerived_from(NS_TOSCA_TYPE);
-
         final Map<String, ToscaProperty> propertiesInNsNodeType = nsNodeType.getProperties();
-
         for (final Entry<String, ToscaProperty> property : propertiesInNsNodeType.entrySet()) {
             final ToscaProperty toscaProperty = property.getValue();
             if (toscaProperty.getDefaultp() != null) {
@@ -342,36 +302,29 @@
                 toscaProperty.setConstraints(Collections.singletonList(constraint));
             }
         }
-
-        propertiesInNsNodeType.entrySet()
-            .removeIf(entry -> PROPERTIES_TO_EXCLUDE_FROM_ETSI_SOL_NSD_NS_NODE_TYPE.contains(entry.getKey()));
+        propertiesInNsNodeType.entrySet().removeIf(entry -> PROPERTIES_TO_EXCLUDE_FROM_ETSI_SOL_NSD_NS_NODE_TYPE.contains(entry.getKey()));
         toscaNodeType.setProperties(propertiesInNsNodeType);
-
         return toscaNodeType;
     }
 
     private boolean propertyIsDefinedInNodeType(final String propertyName) {
         // This will achieve what we want for now, but will look into a more generic solution which would involve
+
         // checking the node_type definition in the VNFD
         return !propertyName.equals("additional_parameters");
     }
 
-
-    private ToscaNodeTemplate createNodeTemplateForNsNodeType(final String nodeType,
-                                                              final ToscaNodeType toscaNodeType) {
+    private ToscaNodeTemplate createNodeTemplateForNsNodeType(final String nodeType, final ToscaNodeType toscaNodeType) {
         final ToscaNodeTemplate nodeTemplate = new ToscaNodeTemplate();
         nodeTemplate.setType(nodeType);
-
         final Map<String, ToscaProperty> properties = toscaNodeType.getProperties();
         final Map<String, Object> nodeTemplateProperties = new HashMap<>();
         for (final Entry<String, ToscaProperty> property : properties.entrySet()) {
             nodeTemplateProperties.put(property.getKey(), property.getValue().getDefaultp());
         }
-
         if (!nodeTemplateProperties.isEmpty()) {
             nodeTemplate.setProperties(nodeTemplateProperties);
         }
-
         final Map<String, Object> interfaces = toscaNodeType.getInterfaces();
         if (interfaces != null) {
             for (final Entry<String, Object> nodeInterface : interfaces.entrySet()) {
@@ -381,37 +334,30 @@
             }
             nodeTemplate.setInterfaces(interfaces);
         }
-
         return nodeTemplate;
     }
 
     private ToscaTemplate parseToToscaTemplate(final Component component) throws NsdException {
         final Either<ToscaTemplate, ToscaError> toscaTemplateRes = toscaExportHandler.convertToToscaTemplate(component);
         if (toscaTemplateRes.isRight()) {
-            String errorMsg = String.format("Could not parse component '%s' to tosca template. Error '%s'",
-                component.getName(), toscaTemplateRes.right().value().name());
+            String errorMsg = String
+                .format("Could not parse component '%s' to tosca template. Error '%s'", component.getName(), toscaTemplateRes.right().value().name());
             throw new NsdException(errorMsg);
         }
-
         return toscaTemplateRes.left().value();
     }
 
-
     private ToscaTemplate exportComponentInterfaceAsToscaTemplate(final Component component) throws NsdException {
         if (null == DEFAULT_IMPORTS) {
             throw new NsdException("Could not load default CSAR imports from configuration");
         }
-
         final ToscaTemplate toscaTemplate = new ToscaTemplate(TOSCA_VERSION);
         toscaTemplate.setImports(new ArrayList<>(DEFAULT_IMPORTS));
         final Either<ToscaTemplate, ToscaError> toscaTemplateRes = toscaExportHandler
             .convertInterfaceNodeType(new HashMap<>(), component, toscaTemplate, new HashMap<>(), false);
         if (toscaTemplateRes.isRight()) {
-            throw new NsdException(String.format("Could not create abstract service from component '%s'",
-                component.getName()));
+            throw new NsdException(String.format("Could not create abstract service from component '%s'", component.getName()));
         }
-
         return toscaTemplateRes.left().value();
     }
-
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGenerator.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGenerator.java
index c4599d7..e66adf3 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGenerator.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGenerator.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import java.util.Optional;
@@ -32,12 +32,10 @@
     /**
      * Generates the a VNF Descriptor based on the ONBOARDED_PACKAGE artifact.
      *
-     * @param name the name of the VNF package
+     * @param name                     the name of the VNF package
      * @param onboardedPackageArtifact the onboarded package for the VNF
      * @return a representation of the VNF package
      * @throws VnfDescriptorException when a problem happens during the generation
      */
-    Optional<VnfDescriptor> generate(final String name, final ArtifactDefinition onboardedPackageArtifact)
-        throws VnfDescriptorException;
-
+    Optional<VnfDescriptor> generate(final String name, final ArtifactDefinition onboardedPackageArtifact) throws VnfDescriptorException;
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGeneratorImpl.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGeneratorImpl.java
index 8cf54d1..902911b 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGeneratorImpl.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGeneratorImpl.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import java.io.FileNotFoundException;
@@ -60,22 +60,22 @@
     private static final String DEFINITIONS_DIRECTORY = "Definitions";
     private static final String TOSCA_META_PATH = "TOSCA-Metadata/TOSCA.meta";
 
-    public Optional<VnfDescriptor> generate(final String name,
-                                            final ArtifactDefinition onboardedPackageArtifact)
-        throws VnfDescriptorException {
+    private static boolean isACsarArtifact(final ArtifactDefinition definition) {
+        return definition.getPayloadData() != null && definition.getArtifactName() != null && CSAR
+            .equalsIgnoreCase(FilenameUtils.getExtension(definition.getArtifactName()));
+    }
+
+    public Optional<VnfDescriptor> generate(final String name, final ArtifactDefinition onboardedPackageArtifact) throws VnfDescriptorException {
         if (!isACsarArtifact(onboardedPackageArtifact)) {
             return Optional.empty();
         }
-
         final FileContentHandler fileContentHandler;
         try {
             fileContentHandler = FileUtils.getFileContentMapFromZip(onboardedPackageArtifact.getPayloadData());
         } catch (final ZipException e) {
-            final String errorMsg = String
-                .format("Could not unzip artifact '%s' content", onboardedPackageArtifact.getArtifactName());
+            final String errorMsg = String.format("Could not unzip artifact '%s' content", onboardedPackageArtifact.getArtifactName());
             throw new VnfDescriptorException(errorMsg, e);
         }
-
         if (MapUtils.isEmpty(fileContentHandler.getFiles())) {
             return Optional.empty();
         }
@@ -83,9 +83,7 @@
         try {
             mainDefinitionFile = getMainFilePathFromMetaFile(fileContentHandler).orElse(null);
         } catch (final IOException e) {
-            final String errorMsg = String
-                .format("Could not read main definition file of artifact '%s'",
-                    onboardedPackageArtifact.getArtifactName());
+            final String errorMsg = String.format("Could not read main definition file of artifact '%s'", onboardedPackageArtifact.getArtifactName());
             throw new VnfDescriptorException(errorMsg, e);
         }
         LOGGER.debug("found main file: {}", mainDefinitionFile);
@@ -95,30 +93,19 @@
         final VnfDescriptor vnfDescriptor = new VnfDescriptor();
         vnfDescriptor.setName(name);
         final String vnfdFileName = FilenameUtils.getName(mainDefinitionFile);
-
         vnfDescriptor.setVnfdFileName(vnfdFileName);
         vnfDescriptor.setDefinitionFiles(getFiles(fileContentHandler, mainDefinitionFile));
         vnfDescriptor.setNodeType(getNodeType(getFileContent(fileContentHandler, mainDefinitionFile)));
-
         return Optional.of(vnfDescriptor);
     }
 
-    private static boolean isACsarArtifact(final ArtifactDefinition definition) {
-        return definition.getPayloadData() != null && definition.getArtifactName() != null && CSAR
-            .equalsIgnoreCase(FilenameUtils.getExtension(definition.getArtifactName()));
-    }
-
     private Map<String, byte[]> getFiles(final FileContentHandler fileContentHandler, final String filePath) {
         final Map<String, byte[]> files = new HashMap<>();
-
         final byte[] fileContent = fileContentHandler.getFileContent(filePath);
-
         if (fileContent != null) {
             final String mainYmlFile = new String(fileContent);
             LOGGER.debug("file content: {}", mainYmlFile);
-
-            files.put(appendDefinitionDirPath(filePath.substring(filePath.lastIndexOf(SLASH) + 1)),
-                getVnfdWithoutTopologyTemplate(fileContent));
+            files.put(appendDefinitionDirPath(filePath.substring(filePath.lastIndexOf(SLASH) + 1)), getVnfdWithoutTopologyTemplate(fileContent));
             final List<Object> imports = getImportFilesPath(mainYmlFile);
             LOGGER.info("found imports {}", imports);
             for (final Object importObject : imports) {
@@ -135,15 +122,13 @@
 
     private String getFileContent(final FileContentHandler fileContentHandler, final String filePath) {
         final byte[] fileContent = fileContentHandler.getFileContent(filePath);
-
         if (fileContent != null) {
             return new String(fileContent);
         }
         return null;
     }
 
-    private Optional<String> getMainFilePathFromMetaFile(final FileContentHandler fileContentHandler)
-        throws IOException {
+    private Optional<String> getMainFilePathFromMetaFile(final FileContentHandler fileContentHandler) throws IOException {
         final Map<String, String> metaFileContent = getMetaFileContent(fileContentHandler);
         final String mainFile = metaFileContent.get(NsdToscaMetadataBuilder.ENTRY_DEFINITIONS);
         if (mainFile != null) {
@@ -153,16 +138,13 @@
         return Optional.empty();
     }
 
-    private Map<String, String> getMetaFileContent(final FileContentHandler fileContentHandler)
-        throws IOException {
+    private Map<String, String> getMetaFileContent(final FileContentHandler fileContentHandler) throws IOException {
         final InputStream inputStream = fileContentHandler.getFileContentAsStream(TOSCA_META_PATH);
         if (inputStream == null) {
             throw new FileNotFoundException("Unable find " + TOSCA_META_PATH + " file");
         }
         final List<String> lines = IOUtils.readLines(inputStream, StandardCharsets.UTF_8);
-
-        return lines.stream().map(str -> str.split(COLON))
-            .collect(Collectors.toMap(str -> str[0], str -> str.length > 1 ? str[1] : EMPTY_STRING));
+        return lines.stream().map(str -> str.split(COLON)).collect(Collectors.toMap(str -> str[0], str -> str.length > 1 ? str[1] : EMPTY_STRING));
     }
 
     private String appendDefinitionDirPath(final String filename) {
@@ -171,9 +153,7 @@
 
     private List<Object> getImportFilesPath(final String mainYmlFile) {
         final Map<Object, Object> fileContentMap = new YamlUtil().yamlToObject(mainYmlFile, Map.class);
-
         final Object importsObject = fileContentMap.get("imports");
-
         if (importsObject instanceof List) {
             return (List<Object>) importsObject;
         }
@@ -184,19 +164,15 @@
         final Yaml yaml = new Yaml();
         final Map<String, Object> toscaFileContent = (Map<String, Object>) yaml.load(new String(vnfdFileContent));
         toscaFileContent.remove("topology_template");
-
         return yaml.dumpAsMap(toscaFileContent).getBytes();
     }
 
     private String getNodeType(final String mainYmlFile) {
         final Map<Object, Object> fileContentMap = new YamlUtil().yamlToObject(mainYmlFile, Map.class);
-
         final Object nodeTypesObject = fileContentMap.get("node_types");
-        if (nodeTypesObject instanceof Map
-            && ((Map<String, Object>) nodeTypesObject).size() == 1) {
+        if (nodeTypesObject instanceof Map && ((Map<String, Object>) nodeTypesObject).size() == 1) {
             return ((Map<String, Object>) nodeTypesObject).keySet().iterator().next();
         }
         return null;
     }
-
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersion.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersion.java
index d447dc4..180337d 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersion.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersion.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config;
 
 import lombok.AllArgsConstructor;
@@ -29,10 +29,7 @@
 @Getter
 @AllArgsConstructor
 public enum EtsiVersion {
-    VERSION_2_5_1("2.5.1"),
-    VERSION_2_7_1("2.7.1"),
-    VERSION_3_3_1("3.3.1");
-
+    VERSION_2_5_1("2.5.1"), VERSION_2_7_1("2.7.1"), VERSION_3_3_1("3.3.1");
     private final String version;
 
     public static EtsiVersion convertOrNull(final String etsiVersion) {
@@ -48,7 +45,6 @@
         if (VERSION_3_3_1.getVersion().equals(etsiVersion)) {
             return VERSION_3_3_1;
         }
-
         return null;
     }
 
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorConfig.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorConfig.java
index d17b48d..d17b03f 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorConfig.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorConfig.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config;
 
 import lombok.Getter;
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorVersionComparator.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorVersionComparator.java
index 40e499c..f24a044 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorVersionComparator.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/NsDescriptorVersionComparator.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config;
 
 import java.util.Comparator;
@@ -32,19 +32,16 @@
         } else if (Integer.parseInt(v1[0]) < Integer.parseInt(v2[0])) {
             return -1;
         }
-
         if (Integer.parseInt(v1[1]) > Integer.parseInt(v2[1])) {
             return 1;
         } else if (Integer.parseInt(v1[1]) < Integer.parseInt(v2[1])) {
             return -1;
         }
-
         if (Integer.parseInt(v1[2]) > Integer.parseInt(v2[2])) {
             return 1;
         } else if (Integer.parseInt(v1[2]) < Integer.parseInt(v2[2])) {
             return -1;
         }
-
         return 0;
     }
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/model/Nsd.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/model/Nsd.java
index a8de728..f1e0faa 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/model/Nsd.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/model/Nsd.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.model;
 
 import java.util.ArrayList;
@@ -31,7 +31,6 @@
     public static final String VERSION_PROPERTY = "version";
     public static final String NAME_PROPERTY = "name";
     public static final String INVARIANT_ID_PROPERTY = "invariant_id";
-
     private String designer;
     private String version;
     private String name;
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/model/VnfDescriptor.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/model/VnfDescriptor.java
index 53615ef..88a2364 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/model/VnfDescriptor.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/model/VnfDescriptor.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.model;
 
 import java.util.HashMap;
@@ -63,5 +63,4 @@
     public void setNodeType(String nodeType) {
         this.nodeType = nodeType;
     }
-
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/NsdTemplateRepresenter.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/NsdTemplateRepresenter.java
index 822d6dc..cb8928f 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/NsdTemplateRepresenter.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/NsdTemplateRepresenter.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.tosca.yaml;
 
 import java.util.ArrayList;
@@ -49,64 +49,50 @@
     }
 
     @Override
-    protected NodeTuple representJavaBeanProperty(final Object javaBean, final Property property,
-                                                  final Object propertyValue, final Tag customTag) {
+    protected NodeTuple representJavaBeanProperty(final Object javaBean, final Property property, final Object propertyValue, final Tag customTag) {
         if (propertyValue == null) {
             return null;
         }
-
         if (ignoredPropertySet.contains(property.getName())) {
             return null;
         }
-
         if (javaBean instanceof ToscaTemplate) {
             return handleToscaTemplate(javaBean, property, propertyValue, customTag);
         }
-
         if (javaBean instanceof ToscaPropertyConstraintValidValues) {
             return handleToscaPropertyConstraintValidValues(javaBean, property, propertyValue, customTag);
         }
-
         if (javaBean instanceof ToscaProperty) {
             return handleToscaProperty(javaBean, property, propertyValue, customTag);
         }
-
         return super.representJavaBeanProperty(javaBean, property, propertyValue, customTag);
     }
 
-    private NodeTuple handleToscaProperty(final Object javaBean, final Property property,
-                                          final Object propertyValue, final Tag customTag) {
+    private NodeTuple handleToscaProperty(final Object javaBean, final Property property, final Object propertyValue, final Tag customTag) {
         final NodeTuple nodeTuple = super.representJavaBeanProperty(javaBean, property, propertyValue, customTag);
         if ("_defaultp_".equals(property.getName())) {
             return new NodeTuple(representData("default"), nodeTuple.getValueNode());
         }
-
         return nodeTuple;
     }
 
-    private NodeTuple handleToscaPropertyConstraintValidValues(final Object javaBean, final Property property,
-                                                               final Object propertyValue, final Tag customTag) {
+    private NodeTuple handleToscaPropertyConstraintValidValues(final Object javaBean, final Property property, final Object propertyValue,
+                                                               final Tag customTag) {
         final NodeTuple nodeTuple = super.representJavaBeanProperty(javaBean, property, propertyValue, customTag);
         if ("validValues".equals(property.getName())) {
             final String validValuesEntryName = ToscaPropertyConstraintValidValues.getEntryToscaName("validValues");
             return new NodeTuple(representData(validValuesEntryName), nodeTuple.getValueNode());
         }
-
         return nodeTuple;
     }
 
-    private NodeTuple handleToscaTemplate(final Object javaBean, final Property property,
-                                          final Object propertyValueObj, final Tag customTag) {
+    private NodeTuple handleToscaTemplate(final Object javaBean, final Property property, final Object propertyValueObj, final Tag customTag) {
         if ("imports".equals(property.getName())) {
-            final List<Map<String, Map<String, String>>> importsList =
-                (List<Map<String, Map<String, String>>>) propertyValueObj;
-
+            final List<Map<String, Map<String, String>>> importsList = (List<Map<String, Map<String, String>>>) propertyValueObj;
             final List<Map<String, String>> newImportList = new ArrayList<>();
             importsList.forEach(importMap -> importMap.forEach((key, value) -> newImportList.add(value)));
-
             return super.representJavaBeanProperty(javaBean, property, newImportList, customTag);
         }
-
         return super.representJavaBeanProperty(javaBean, property, propertyValueObj, customTag);
     }
 
@@ -115,7 +101,6 @@
         if (!classTags.containsKey(javaBean.getClass())) {
             addClassTag(javaBean.getClass(), Tag.MAP);
         }
-
         return super.representJavaBean(properties, javaBean);
     }
 
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/ToscaTemplateYamlGenerator.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/ToscaTemplateYamlGenerator.java
index 4c2cd87..b73b529 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/ToscaTemplateYamlGenerator.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/ToscaTemplateYamlGenerator.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.tosca.yaml;
 
 import org.openecomp.sdc.be.tosca.model.ToscaTemplate;
@@ -69,5 +69,4 @@
         representer.addClassTag(toscaTemplate.getClass(), Tag.MAP);
         representer.setPropertyUtils(new UnsortedPropertyUtils());
     }
-
 }
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/UnsortedPropertyUtils.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/UnsortedPropertyUtils.java
index b93db62..6c70e93 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/UnsortedPropertyUtils.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/main/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/UnsortedPropertyUtils.java
@@ -1,3 +1,4 @@
+ 
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.tosca.yaml;
 
 import java.beans.IntrospectionException;
@@ -30,10 +30,8 @@
 public class UnsortedPropertyUtils extends PropertyUtils {
 
     @Override
-    protected Set<Property> createPropertySet(final Class clazz, final BeanAccess beanAccess)
-        throws IntrospectionException {
-
+    protected Set<Property> createPropertySet(final Class clazz, final BeanAccess beanAccess) throws IntrospectionException {
         final Collection<Property> fields = getPropertiesMap(clazz, BeanAccess.FIELD).values();
         return new LinkedHashSet<>(fields);
     }
-}
\ No newline at end of file
+}
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdCsarManifestBuilderTest.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdCsarManifestBuilderTest.java
index 8a1a4cf..1ff3a6d 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdCsarManifestBuilderTest.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/builder/NsdCsarManifestBuilderTest.java
@@ -1,3 +1,4 @@
+
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
@@ -16,10 +17,11 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.builder;
 
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.openecomp.sdc.be.plugins.etsi.nfv.nsd.builder.NsdCsarManifestBuilder.ATTRIBUTE_SEPARATOR;
 import static org.openecomp.sdc.be.plugins.etsi.nfv.nsd.builder.NsdCsarManifestBuilder.COMPATIBLE_SPECIFICATION_VERSIONS;
 import static org.openecomp.sdc.be.plugins.etsi.nfv.nsd.builder.NsdCsarManifestBuilder.METADATA;
@@ -30,7 +32,6 @@
 import java.util.List;
 import org.junit.jupiter.api.Test;
 
-
 class NsdCsarManifestBuilderTest {
 
     @Test
@@ -52,20 +53,12 @@
         assertSource(manifest, source1);
         assertSource(manifest, source2);
         assertCompatibleSpecificationVersions(manifest, "1.0.0,1.0.1");
-        final String expectedManifest = "metadata: \n"
-            + "nsd_designer: designer\n"
-            + "nsd_invariant_id: invariantId\n"
-            + "nsd_name: name\n"
-            + "nsd_file_structure_version: fileStructureVersion\n"
-            + "compatible_specification_versions: 1.0.0,1.0.1\n"
-            + "\n"
-            + "Source: Definitions/aSource1.yaml\n"
-            + "Source: Definitions/aSource2.yaml\n"
-            + "";
+        final String expectedManifest = "metadata: \n" + "nsd_designer: designer\n" + "nsd_invariant_id: invariantId\n" + "nsd_name: name\n"
+            + "nsd_file_structure_version: fileStructureVersion\n" + "compatible_specification_versions: 1.0.0,1.0.1\n" + "\n"
+            + "Source: Definitions/aSource1.yaml\n" + "Source: Definitions/aSource2.yaml\n" + "";
         assertEquals(expectedManifest, manifest);
     }
 
-
     @Test
     void testMetadataReleaseDateTime() {
         final NsdCsarManifestBuilder nsdCsarManifestBuilder = new NsdCsarManifestBuilder();
@@ -105,6 +98,4 @@
     void assertSource(final String manifest, final String source) {
         assertTrue(manifest.contains(SOURCE + ATTRIBUTE_SEPARATOR + source));
     }
-
-  
-}
\ No newline at end of file
+}
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsCsarEntryGeneratorTest.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsCsarEntryGeneratorTest.java
index 720ed77..8ebd1df 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsCsarEntryGeneratorTest.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsCsarEntryGeneratorTest.java
@@ -1,3 +1,4 @@
+
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -47,7 +47,9 @@
 
 class EtsiNfvNsCsarEntryGeneratorTest {
 
-
+    private static final String SERVICE_NORMALIZED_NAME = "normalizedName";
+    private static final String CSAR_ENTRY_EMPTY_ASSERT = "Csar Entries should be empty";
+    private static final EtsiVersion nsdVersion = EtsiVersion.VERSION_2_5_1;
     @Mock
     private EtsiNfvNsdCsarGeneratorFactory etsiNfvNsdCsarGeneratorFactory;
     @Mock
@@ -57,10 +59,6 @@
     @InjectMocks
     private EtsiNfvNsCsarEntryGenerator etsiNfvNsCsarEntryGenerator;
 
-    private static final String SERVICE_NORMALIZED_NAME = "normalizedName";
-    private static final String CSAR_ENTRY_EMPTY_ASSERT = "Csar Entries should be empty";
-    private static final EtsiVersion nsdVersion = EtsiVersion.VERSION_2_5_1;
-
     @BeforeEach
     void setUp() {
         MockitoAnnotations.initMocks(this);
@@ -72,9 +70,7 @@
         mockServiceComponent();
         final byte[] expectedNsdCsar = new byte[5];
         when(etsiNfvNsdCsarGenerator.generateNsdCsar(service)).thenReturn(expectedNsdCsar);
-
         final Map<String, byte[]> entryMap = etsiNfvNsCsarEntryGenerator.generateCsarEntries(service);
-
         assertThat("Csar Entries should contain only one entry", entryMap.size(), is(1));
         assertThat("Csar Entries should contain the expected entry", entryMap,
             hasEntry(String.format(NSD_FILE_PATH_FORMAT, ETSI_PACKAGE, SERVICE_NORMALIZED_NAME), expectedNsdCsar));
@@ -85,7 +81,6 @@
         mockServiceComponent();
         when(etsiNfvNsdCsarGenerator.generateNsdCsar(service)).thenThrow(new NsdException(""));
         final Map<String, byte[]> entryMap = etsiNfvNsCsarEntryGenerator.generateCsarEntries(service);
-
         assertThat(CSAR_ENTRY_EMPTY_ASSERT, entryMap, is(anEmptyMap()));
     }
 
@@ -94,7 +89,6 @@
         mockServiceComponent();
         when(etsiNfvNsdCsarGenerator.generateNsdCsar(service)).thenThrow(new RuntimeException());
         final Map<String, byte[]> entryMap = etsiNfvNsCsarEntryGenerator.generateCsarEntries(service);
-
         assertThat(CSAR_ENTRY_EMPTY_ASSERT, entryMap, is(anEmptyMap()));
     }
 
@@ -102,7 +96,6 @@
     void componentNullOrNotAServiceTest() {
         Map<String, byte[]> entryMap = etsiNfvNsCsarEntryGenerator.generateCsarEntries(service);
         assertThat(CSAR_ENTRY_EMPTY_ASSERT, entryMap, is(anEmptyMap()));
-
         entryMap = etsiNfvNsCsarEntryGenerator.generateCsarEntries(null);
         assertThat(CSAR_ENTRY_EMPTY_ASSERT, entryMap, is(anEmptyMap()));
     }
@@ -123,15 +116,13 @@
         when(service.getName()).thenReturn("anyName");
         when(service.getComponentType()).thenReturn(ComponentTypeEnum.SERVICE);
         when(service.getNormalizedName()).thenReturn(SERVICE_NORMALIZED_NAME);
-
         final Map<String, String> categorySpecificMetadataMap = new HashMap<>();
         categorySpecificMetadataMap.put(ETSI_VERSION_METADATA, nsdVersion.getVersion());
         when(service.getCategorySpecificMetadata()).thenReturn(categorySpecificMetadataMap);
-
         final List<CategoryDefinition> categoryDefinitionList = new ArrayList<>();
         final CategoryDefinition nsComponentCategoryDefinition = new CategoryDefinition();
         nsComponentCategoryDefinition.setName(ETSI_NS_COMPONENT_CATEGORY);
         categoryDefinitionList.add(nsComponentCategoryDefinition);
         when(service.getCategories()).thenReturn(categoryDefinitionList);
     }
-}
\ No newline at end of file
+}
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImplTest.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImplTest.java
index ce66d2e..b498c45 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImplTest.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/EtsiNfvNsdCsarGeneratorImplTest.java
@@ -1,3 +1,4 @@
+
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -49,14 +49,15 @@
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.exception.NsdException;
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.exception.VnfDescriptorException;
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.factory.NsDescriptorGeneratorFactory;
-import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config.NsDescriptorConfig;
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config.EtsiVersion;
+import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config.NsDescriptorConfig;
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.model.Nsd;
 import org.openecomp.sdc.be.plugins.etsi.nfv.nsd.model.VnfDescriptor;
 import org.openecomp.sdc.be.resources.data.DAOArtifactData;
 
 class EtsiNfvNsdCsarGeneratorImplTest {
 
+    private static final String SERVICE_NORMALIZED_NAME = "normalizedName";
     @Mock
     private VnfDescriptorGenerator vnfDescriptorGenerator;
     @Mock
@@ -67,17 +68,14 @@
     private ArtifactCassandraDao artifactCassandraDao;
     @Mock
     private Service service;
-
     private EtsiNfvNsdCsarGeneratorImpl etsiNfvNsdCsarGenerator;
 
-    private static final String SERVICE_NORMALIZED_NAME = "normalizedName";
-
     @BeforeEach
     void setUp() {
         MockitoAnnotations.initMocks(this);
         final EtsiVersion version2_5_1 = EtsiVersion.VERSION_2_5_1;
-        etsiNfvNsdCsarGenerator = new EtsiNfvNsdCsarGeneratorImpl(new NsDescriptorConfig(version2_5_1),
-            vnfDescriptorGenerator, nsDescriptorGeneratorFactory, artifactCassandraDao);
+        etsiNfvNsdCsarGenerator = new EtsiNfvNsdCsarGeneratorImpl(new NsDescriptorConfig(version2_5_1), vnfDescriptorGenerator,
+            nsDescriptorGeneratorFactory, artifactCassandraDao);
         when(nsDescriptorGeneratorFactory.create()).thenReturn(nsDescriptorGeneratorImpl);
     }
 
@@ -99,16 +97,12 @@
         when(service.getComponentType()).thenReturn(ComponentTypeEnum.SERVICE);
         final String componentInstance1Name = "componentInstance1";
         final ComponentInstance componentInstance1 = mockServiceComponentInstance(componentInstance1Name);
-        final ArtifactDefinition instanceArtifact1 = mockComponentInstanceArtifact(componentInstance1,
-            "instanceArtifact1");
-
+        final ArtifactDefinition instanceArtifact1 = mockComponentInstanceArtifact(componentInstance1, "instanceArtifact1");
         final VnfDescriptor vnfDescriptor1 = new VnfDescriptor();
         final List<VnfDescriptor> vnfDescriptorList = Collections.singletonList(vnfDescriptor1);
         final Nsd nsd = new Nsd();
-        when(vnfDescriptorGenerator.generate(componentInstance1Name, instanceArtifact1))
-            .thenReturn(Optional.of(vnfDescriptor1));
+        when(vnfDescriptorGenerator.generate(componentInstance1Name, instanceArtifact1)).thenReturn(Optional.of(vnfDescriptor1));
         when(nsDescriptorGeneratorImpl.generate(service, vnfDescriptorList)).thenReturn(Optional.of(nsd));
-
         final List<CategoryDefinition> categoryDefinitionList = new ArrayList<>();
         final CategoryDefinition nsComponentCategoryDefinition = new CategoryDefinition();
         nsComponentCategoryDefinition.setName(ETSI_NS_COMPONENT_CATEGORY);
@@ -144,15 +138,12 @@
         final List<ComponentInstance> componentInstanceList = new ArrayList<>();
         componentInstanceList.add(componentInstance);
         when(service.getComponentInstances()).thenReturn(componentInstanceList);
-
         return componentInstance;
     }
 
-    private ArtifactDefinition mockComponentInstanceArtifact(final ComponentInstance componentInstance,
-                                                             final String instanceArtifactId) {
+    private ArtifactDefinition mockComponentInstanceArtifact(final ComponentInstance componentInstance, final String instanceArtifactId) {
         final Map<String, ArtifactDefinition> deploymentArtifactMap = new HashMap<>();
         when(componentInstance.getDeploymentArtifacts()).thenReturn(deploymentArtifactMap);
-
         final ArtifactDefinition instanceArtifact1 = mockArtifactDefinition(instanceArtifactId);
         instanceArtifact1.setToscaPresentationValue(JsonPresentationFields.ARTIFACT_TYPE, ONBOARDED_PACKAGE.getType());
         deploymentArtifactMap.put(instanceArtifactId, instanceArtifact1);
@@ -166,7 +157,6 @@
     private ArtifactDefinition mockArtifactDefinition(final String artifactId) {
         final ArtifactDefinition artifact = new ArtifactDefinition();
         artifact.setEsId(artifactId);
-
         return artifact;
     }
-}
\ No newline at end of file
+}
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGeneratorImplTest.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGeneratorImplTest.java
index 59fa445..19cfefa 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGeneratorImplTest.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/NsDescriptorGeneratorImplTest.java
@@ -1,3 +1,4 @@
+
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -70,10 +70,6 @@
 
     private static final String VNFD_AMF_NODE_NAME = "vnfd_amf";
     private static final String VIRTUAL_LINK_REQUIREMENT_NAME = "virtual_link";
-
-    @Mock
-    private ToscaExportHandler toscaExportHandler;
-
     private final ObjectProvider<ToscaTemplateYamlGenerator> toscaTemplateYamlGeneratorProvider = new ObjectProvider<>() {
         @Override
         public ToscaTemplateYamlGenerator getObject(Object... args) {
@@ -95,7 +91,8 @@
             return null;
         }
     };
-
+    @Mock
+    private ToscaExportHandler toscaExportHandler;
     private NsDescriptorGeneratorImpl nsDescriptorGenerator;
 
     @BeforeEach
@@ -112,7 +109,6 @@
         nodeImportEntry.put("file", "nodes.yml");
         importMap.put("nodes", nodeImportEntry);
         defaultImports.add(importMap);
-
         final ConfigurationSource configurationSource = mock(ConfigurationSource.class);
         final Configuration configuration = new Configuration();
         configuration.setDefaultImports(defaultImports);
@@ -130,7 +126,6 @@
         final ToscaTemplate componentToscaTemplate = new ToscaTemplate("");
         final ToscaTopolgyTemplate componentToscaTopologyTemplate = new ToscaTopolgyTemplate();
         componentToscaTemplate.setTopology_template(componentToscaTopologyTemplate);
-
         final HashMap<String, ToscaNodeTemplate> nodeTemplateMap = new HashMap<>();
         final ToscaNodeTemplate vnfAmfNodeTemplate = new ToscaNodeTemplate();
         vnfAmfNodeTemplate.setType("com.ericsson.resource.abstract.Ericsson.AMF");
@@ -139,46 +134,38 @@
         //a property that wont be excluded
         vnfAmfNodeTemplate.setProperties(ImmutableMap.of("will_not_be_excluded", new ToscaProperty()));
         nodeTemplateMap.put(VNFD_AMF_NODE_NAME, vnfAmfNodeTemplate);
-        
         final Map<String, ToscaTemplateCapability> vnfAmfCapabilities = new HashMap<>();
         vnfAmfCapabilities.put("myCapability", new ToscaTemplateCapability());
-		vnfAmfNodeTemplate.setCapabilities(vnfAmfCapabilities);
+        vnfAmfNodeTemplate.setCapabilities(vnfAmfCapabilities);
         componentToscaTopologyTemplate.setNode_templates(nodeTemplateMap);
-        
         final SubstitutionMapping substitutionMapping = mock(SubstitutionMapping.class);
         Map<String, String[]> requirements = new HashMap<>();
         String[] requirementAssignment = {"VNF1", VIRTUAL_LINK_REQUIREMENT_NAME};
         requirements.put(VIRTUAL_LINK_REQUIREMENT_NAME, requirementAssignment);
-		when(substitutionMapping.getRequirements()).thenReturn(requirements);
-		Map<String, String[]> capabilities = new HashMap<>();
+        when(substitutionMapping.getRequirements()).thenReturn(requirements);
+        Map<String, String[]> capabilities = new HashMap<>();
         String[] capabilitiesAssignment = {"VNF1", "capability1"};
         capabilities.put("capability", capabilitiesAssignment);
-		when(substitutionMapping.getCapabilities()).thenReturn(capabilities);
-		componentToscaTopologyTemplate.setSubstitution_mappings(substitutionMapping);
-
+        when(substitutionMapping.getCapabilities()).thenReturn(capabilities);
+        componentToscaTopologyTemplate.setSubstitution_mappings(substitutionMapping);
         final ToscaTemplate componentInterfaceToscaTemplate = new ToscaTemplate("");
         final String designerPropertyValue = "designerValue";
         final String versionPropertyValue = "versionValue";
         final String namePropertyValue = "nameValue";
         final String invariantIdPropertyValue = "invariantIdValue";
-        final ToscaNodeType interfaceToscaNodeType = createDefaultInterfaceToscaNodeType(designerPropertyValue,
-            versionPropertyValue, namePropertyValue, invariantIdPropertyValue);
+        final ToscaNodeType interfaceToscaNodeType = createDefaultInterfaceToscaNodeType(designerPropertyValue, versionPropertyValue,
+            namePropertyValue, invariantIdPropertyValue);
         final String nsNodeTypeName = "nsNodeTypeName";
         componentInterfaceToscaTemplate.setNode_types(ImmutableMap.of(nsNodeTypeName, interfaceToscaNodeType));
-
-
         when(toscaExportHandler.convertToToscaTemplate(component)).thenReturn(Either.left(componentToscaTemplate));
         when(toscaExportHandler.convertInterfaceNodeType(any(), any(), any(), any(), anyBoolean()))
             .thenReturn(Either.left(componentInterfaceToscaTemplate));
-
         final List<VnfDescriptor> vnfDescriptorList = new ArrayList<>();
         VnfDescriptor vnfDescriptor1 = new VnfDescriptor();
         vnfDescriptor1.setName(VNFD_AMF_NODE_NAME);
         vnfDescriptor1.setVnfdFileName("vnfd_amf.yaml");
         vnfDescriptor1.setNodeType("com.ericsson.resource.abstract.Ericsson.AMF");
-
         vnfDescriptorList.add(vnfDescriptor1);
-
         //when
         final Nsd nsd = nsDescriptorGenerator.generate(component, vnfDescriptorList).orElse(null);
         //then
@@ -187,48 +174,31 @@
         assertThat("Nsd version should be as expected", nsd.getVersion(), is(versionPropertyValue));
         assertThat("Nsd name should be as expected", nsd.getName(), is(namePropertyValue));
         assertThat("Nsd invariantId should be as expected", nsd.getInvariantId(), is(invariantIdPropertyValue));
-
         final Map<String, Object> toscaTemplateYaml = readYamlAsMap(nsd.getContents());
-        @SuppressWarnings("unchecked")
-        final Map<String, Object> topologyTemplate = (Map<String, Object>) toscaTemplateYaml.get("topology_template");
+        @SuppressWarnings("unchecked") final Map<String, Object> topologyTemplate = (Map<String, Object>) toscaTemplateYaml.get("topology_template");
         assertThat("topology_template should not be empty", topologyTemplate, is(not(anEmptyMap())));
-        @SuppressWarnings("unchecked")
-        final Map<String, Object> substitutionMappings =
-            (Map<String, Object>) topologyTemplate.get("substitution_mappings");
+        @SuppressWarnings("unchecked") final Map<String, Object> substitutionMappings = (Map<String, Object>) topologyTemplate
+            .get("substitution_mappings");
         assertThat("substitution_mappings should not be empty", substitutionMappings, is(not(anEmptyMap())));
-        assertThat("substitution_mappings->node_type should not be null",
-            substitutionMappings.get("node_type"), is(notNullValue()));
-        assertThat("substitution_mappings->node_type should be as expected",
-            substitutionMappings.get("node_type"), is(nsNodeTypeName));
-        
+        assertThat("substitution_mappings->node_type should not be null", substitutionMappings.get("node_type"), is(notNullValue()));
+        assertThat("substitution_mappings->node_type should be as expected", substitutionMappings.get("node_type"), is(nsNodeTypeName));
         final Map<String, List<String>> subMappingRequirements = (Map<String, List<String>>) substitutionMappings.get("requirements");
         assertThat(subMappingRequirements.get(VIRTUAL_LINK_REQUIREMENT_NAME).get(0), is("VNF1"));
         assertThat(subMappingRequirements.get(VIRTUAL_LINK_REQUIREMENT_NAME).get(1), is(VIRTUAL_LINK_REQUIREMENT_NAME));
         final Map<String, List<String>> subMappingCapabilities = (Map<String, List<String>>) substitutionMappings.get("capabilities");
         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()));
+        @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()));
     }
 
-    private ToscaNodeType createDefaultInterfaceToscaNodeType(final String designerPropertyValue,
-                                                              final String versionPropertyValue,
-                                                              final String namePropertyValue,
-                                                              final String invariantIdPropertyValue) {
+    private ToscaNodeType createDefaultInterfaceToscaNodeType(final String designerPropertyValue, final String versionPropertyValue,
+                                                              final String namePropertyValue, final String invariantIdPropertyValue) {
         final ToscaNodeType interfaceToscaNodeType = new ToscaNodeType();
-        interfaceToscaNodeType.setProperties(
-            ImmutableMap.of("designer", createToscaProperty(designerPropertyValue),
-                "version", createToscaProperty(versionPropertyValue),
-                "name", createToscaProperty(namePropertyValue),
-                "invariant_id", createToscaProperty(invariantIdPropertyValue))
-        );
+        interfaceToscaNodeType.setProperties(ImmutableMap
+            .of("designer", createToscaProperty(designerPropertyValue), "version", createToscaProperty(versionPropertyValue), "name",
+                createToscaProperty(namePropertyValue), "invariant_id", createToscaProperty(invariantIdPropertyValue)));
         return interfaceToscaNodeType;
     }
 
@@ -240,8 +210,7 @@
 
     private ToscaProperty createToscaProperty(final String value) {
         final ToscaProperty toscaProperty = new ToscaProperty();
-        final ToscaPropertyConstraint toscaPropertyConstraint =
-            new ToscaPropertyConstraintValidValues(ImmutableList.of(value));
+        final ToscaPropertyConstraint toscaPropertyConstraint = new ToscaPropertyConstraintValidValues(ImmutableList.of(value));
         toscaProperty.setConstraints(ImmutableList.of(toscaPropertyConstraint));
         return toscaProperty;
     }
@@ -250,7 +219,7 @@
     private Map<String, Object> readYamlAsMap(final byte[] yamlContents) throws IOException {
         final Yaml yaml = new Yaml();
         try (final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(yamlContents)) {
-            return  (Map<String, Object>) yaml.load(byteArrayInputStream);
+            return (Map<String, Object>) yaml.load(byteArrayInputStream);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGeneratorImplTest.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGeneratorImplTest.java
index e223fda..3c32549 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGeneratorImplTest.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/VnfDescriptorGeneratorImplTest.java
@@ -1,3 +1,4 @@
+
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator;
 
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -48,30 +48,23 @@
         artifactDefinition.setPayload(onboardedPackage);
         artifactDefinition.setArtifactName("vnf-onboarded-csar.csar");
         final String vnfDescriptorName = "vnf-onboarded-csar";
-        final VnfDescriptor vnfDescriptor = vnfDescriptorGenerator
-            .generate(vnfDescriptorName, artifactDefinition).orElse(null);
+        final VnfDescriptor vnfDescriptor = vnfDescriptorGenerator.generate(vnfDescriptorName, artifactDefinition).orElse(null);
         final String expectedNodeType = "com.ericsson.resource.abstract.Ericsson.AMF";
         final String expectedVnfdFileName = "vnfd_amf.yaml";
         assertThat("Vnf Descriptor should be present", vnfDescriptor, is(notNullValue()));
-        assertThat("Vnf Descriptor should have the expected name", vnfDescriptor.getName(),
-            is(vnfDescriptorName));
-        assertThat("Vnf Descriptor should have the expected node type", vnfDescriptor.getNodeType(),
-            is(expectedNodeType));
-        assertThat("Vnf Descriptor should have the expected vnfd file name", vnfDescriptor.getVnfdFileName(),
-            is(expectedVnfdFileName));
-        assertThat("Vnf Descriptor should contain the expected definition files count",
-            vnfDescriptor.getDefinitionFiles().size(), is(2));
-        assertThat("Vnf Descriptor should contain the expected definition entries",
-            vnfDescriptor.getDefinitionFiles().keySet(), contains("Definitions/vnfd_amf.yaml",
-                "Definitions/etsi_nfv_sol001_vnfd_2_5_1_types.yaml"));
+        assertThat("Vnf Descriptor should have the expected name", vnfDescriptor.getName(), is(vnfDescriptorName));
+        assertThat("Vnf Descriptor should have the expected node type", vnfDescriptor.getNodeType(), is(expectedNodeType));
+        assertThat("Vnf Descriptor should have the expected vnfd file name", vnfDescriptor.getVnfdFileName(), is(expectedVnfdFileName));
+        assertThat("Vnf Descriptor should contain the expected definition files count", vnfDescriptor.getDefinitionFiles().size(), is(2));
+        assertThat("Vnf Descriptor should contain the expected definition entries", vnfDescriptor.getDefinitionFiles().keySet(),
+            contains("Definitions/vnfd_amf.yaml", "Definitions/etsi_nfv_sol001_vnfd_2_5_1_types.yaml"));
     }
 
     private byte[] getResourceAsByteArray(final String filename) throws IOException {
         try (final InputStream inputStream = readFileAsStream(filename)) {
             return IOUtils.toByteArray(inputStream);
         } catch (final IOException ex) {
-            throw new IOException(
-                String.format("Could not read the file \"%s\"", filename), ex);
+            throw new IOException(String.format("Could not read the file \"%s\"", filename), ex);
         }
     }
 
@@ -79,5 +72,4 @@
         final Path path = Paths.get(testResourcesPath.toString(), fileName);
         return new FileInputStream(path.toFile());
     }
-
-}
\ No newline at end of file
+}
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersionComparatorTest.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersionComparatorTest.java
index 6225cea..8e51eaf 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersionComparatorTest.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/generator/config/EtsiVersionComparatorTest.java
@@ -1,3 +1,4 @@
+
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2021 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.generator.config;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -39,4 +39,4 @@
         assertEquals(1, comparator.compare(VERSION_3_3_1, VERSION_2_7_1));
         assertEquals(-1, comparator.compare(VERSION_2_7_1, VERSION_3_3_1));
     }
-}
\ No newline at end of file
+}
diff --git a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/ToscaTemplateYamlGeneratorTest.java b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/ToscaTemplateYamlGeneratorTest.java
index 5341598..b5ec982 100644
--- a/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/ToscaTemplateYamlGeneratorTest.java
+++ b/catalog-be-plugins/etsi-nfv-nsd-csar-plugin/src/test/java/org/openecomp/sdc/be/plugins/etsi/nfv/nsd/tosca/yaml/ToscaTemplateYamlGeneratorTest.java
@@ -1,3 +1,4 @@
+
 /*
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation
@@ -16,7 +17,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.plugins.etsi.nfv.nsd.tosca.yaml;
 
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -40,24 +40,15 @@
     void testGenerateYamlWithImportsKey() {
         //given
         final ToscaTemplate toscaTemplate = new ToscaTemplate("tosca_simple_yaml_1_1");
-        final List<Map<String, Map<String, String>>> importList =
-            ImmutableList.of(
-                ImmutableMap.of("etsi_nfv_sol001_nsd_2_7_1_types",
-                    ImmutableMap.of("file", "etsi_nfv_sol001_nsd_2_7_1_types.yaml")
-                ),
-                ImmutableMap.of("anotherImport",
-                    ImmutableMap.of("file", "anotherImport.yaml")
-                )
-            );
+        final List<Map<String, Map<String, String>>> importList = ImmutableList
+            .of(ImmutableMap.of("etsi_nfv_sol001_nsd_2_7_1_types", ImmutableMap.of("file", "etsi_nfv_sol001_nsd_2_7_1_types.yaml")),
+                ImmutableMap.of("anotherImport", ImmutableMap.of("file", "anotherImport.yaml")));
         toscaTemplate.setImports(importList);
         final ToscaTemplateYamlGenerator toscaTemplateYamlGenerator = new ToscaTemplateYamlGenerator(toscaTemplate);
         //when
         final String toscaTemplateYamlString = toscaTemplateYamlGenerator.parseToYamlString();
-
         //then
-        final String expectedImports = "imports:\n"
-            + "- file: etsi_nfv_sol001_nsd_2_7_1_types.yaml\n"
-            + "- file: anotherImport.yaml";
+        final String expectedImports = "imports:\n" + "- file: etsi_nfv_sol001_nsd_2_7_1_types.yaml\n" + "- file: anotherImport.yaml";
         assertThat("Imports format should be as expected", toscaTemplateYamlString.contains(expectedImports), is(true));
     }
 
@@ -65,17 +56,15 @@
     void testGenerateYamlWithToscaProperty() {
         //given
         final ToscaTemplate toscaTemplate = new ToscaTemplate("tosca_simple_yaml_1_1");
-
         final Map<String, ToscaProperty> toscaPropertyMap = new HashMap<>();
         final ToscaProperty toscaProperty = new ToscaProperty();
         final String defaultpValue = "defaultpValue";
         toscaProperty.setDefaultp(defaultpValue);
-        ToscaPropertyConstraintValidValues toscaPropertyConstraintValidValues =
-            new ToscaPropertyConstraintValidValues(Collections.singletonList(defaultpValue));
+        ToscaPropertyConstraintValidValues toscaPropertyConstraintValidValues = new ToscaPropertyConstraintValidValues(
+            Collections.singletonList(defaultpValue));
         toscaProperty.setConstraints(Collections.singletonList(toscaPropertyConstraintValidValues));
         final String propertyName = "aProperty";
         toscaPropertyMap.put(propertyName, toscaProperty);
-
         final Map<String, ToscaNodeType> toscaNodeMap = new HashMap<>();
         final ToscaNodeType toscaNodeType = new ToscaNodeType();
         toscaNodeType.setProperties(toscaPropertyMap);
@@ -84,15 +73,10 @@
         final ToscaTemplateYamlGenerator toscaTemplateYamlGenerator = new ToscaTemplateYamlGenerator(toscaTemplate);
         //when
         final String toscaTemplateYamlString = toscaTemplateYamlGenerator.parseToYamlString();
-
-        final String expectedProperty = String.format("%s:\n"
-                + "        default: %s\n"
-                + "        constraints:\n"
-                + "        - valid_values:\n"
-                + "          - %s",
-            propertyName, defaultpValue, defaultpValue);
+        final String expectedProperty = String
+            .format("%s:\n" + "        default: %s\n" + "        constraints:\n" + "        - valid_values:\n" + "          - %s", propertyName,
+                defaultpValue, defaultpValue);
         //then
-        assertThat("Property format should be as expected",
-            toscaTemplateYamlString.contains(expectedProperty), is(true));
+        assertThat("Property format should be as expected", toscaTemplateYamlString.contains(expectedProperty), is(true));
     }
-}
\ No newline at end of file
+}
