diff --git a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParserTest.java b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParserTest.java
index dcaf2b9..e48bfc4 100644
--- a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParserTest.java
+++ b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParserTest.java
@@ -25,6 +25,8 @@
 
 package org.onap.clamp.clds.sdc.controller.installer;
 
+import static org.assertj.core.api.Assertions.assertThat;
+
 import com.google.gson.Gson;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
@@ -57,7 +59,7 @@
     private static String microServiceTheWholeBlueprintValid;
     private static String microServiceBlueprintOldStyleTCA;
     private static String microServiceBlueprintOldStyleHolmes;
-
+    private static String newMicroServiceBlueprint;
     private static JsonObject jsonObjectBlueprintValid;
     private static JsonObject jsonObjectBlueprintWithoutName;
     private static JsonObject jsonObjectBlueprintWithoutProperties;
@@ -66,22 +68,22 @@
     /**
      * Method to load Blueprints before all test.
      *
-     * @throws IOException
-     *         In case of issues when opening the files
+     * @throws IOException In case of issues when opening the files
      */
     @BeforeClass
     public static void loadBlueprints() throws IOException {
         microServiceTheWholeBlueprintValid = ResourceFileUtil
-            .getResourceAsString("clds/blueprint-with-microservice-chain.yaml");
+                .getResourceAsString("clds/blueprint-with-microservice-chain.yaml");
         microServiceBlueprintOldStyleTCA = ResourceFileUtil.getResourceAsString("clds/tca-old-style-ms.yaml");
+        newMicroServiceBlueprint = ResourceFileUtil.getResourceAsString("clds/new-microservice.yaml");
         microServiceBlueprintOldStyleHolmes = ResourceFileUtil.getResourceAsString("clds/holmes-old-style-ms.yaml");
 
         String microServiceBlueprintValid = ResourceFileUtil
-            .getResourceAsString("clds/single-microservice-fragment-valid.yaml");
+                .getResourceAsString("clds/single-microservice-fragment-valid.yaml");
         String microServiceBlueprintWithoutName = ResourceFileUtil
-            .getResourceAsString("clds/single-microservice-fragment-without-name.yaml");
+                .getResourceAsString("clds/single-microservice-fragment-without-name.yaml");
         String microServiceBlueprintWithoutProperties = ResourceFileUtil
-            .getResourceAsString("clds/single-microservice-fragment-without-properties.yaml");
+                .getResourceAsString("clds/single-microservice-fragment-without-properties.yaml");
 
         jsonObjectBlueprintValid = yamlToJson(microServiceBlueprintValid);
         jsonObjectBlueprintWithoutName = yamlToJson(microServiceBlueprintWithoutName);
@@ -97,7 +99,7 @@
     public void getNameShouldReturnDefinedName() {
         final JsonObject jsonObject = jsonObjectBlueprintValid;
         String expectedName = jsonObject.get(jsonObject.keySet().iterator().next()).getAsJsonObject().get("properties")
-            .getAsJsonObject().get("name").getAsString();
+                .getAsJsonObject().get("name").getAsString();
         Entry<String, JsonElement> entry = jsonObject.entrySet().iterator().next();
         String actualName = new BlueprintParser().getName(entry);
 
@@ -174,8 +176,8 @@
     @Test
 
     public void fallBackToOneMicroServiceTcaTest() {
-        MicroService tcaMs = new MicroService(BlueprintParser.TCA,
-                "onap.policies.monitoring.cdap.tca.hi.lo.app", "", "");
+        MicroService tcaMs = new MicroService(BlueprintParser.TCA, "onap.policies.monitoring.cdap.tca.hi.lo.app", "",
+                "");
         List<MicroService> expected = Collections.singletonList(tcaMs);
         List<MicroService> actual = new BlueprintParser().fallbackToOneMicroService(microServiceBlueprintOldStyleTCA);
 
@@ -184,16 +186,27 @@
 
     @Test
     public void fallBackToOneMicroServiceHolmesTest() {
-        MicroService holmesMs = new MicroService(BlueprintParser.HOLMES,
-                "onap.policies.monitoring.cdap.tca.hi.lo.app", "", "");
+        MicroService holmesMs = new MicroService(BlueprintParser.HOLMES, "onap.policies.monitoring.cdap.tca.hi.lo.app",
+                "", "");
 
         List<MicroService> expected = Collections.singletonList(holmesMs);
         List<MicroService> actual = new BlueprintParser()
-            .fallbackToOneMicroService(microServiceBlueprintOldStyleHolmes);
+                .fallbackToOneMicroService(microServiceBlueprintOldStyleHolmes);
 
         Assert.assertEquals(expected, actual);
     }
 
+    @Test
+    public void newMicroServiceTest() {
+        List<MicroService> microServicesChain = new ChainGenerator()
+                .getChainOfMicroServices(new BlueprintParser().getMicroServices(newMicroServiceBlueprint));
+        if (microServicesChain.isEmpty()) {
+            microServicesChain = new BlueprintParser().fallbackToOneMicroService(newMicroServiceBlueprint);
+        }
+        assertThat(microServicesChain.size()).isEqualTo(1);
+        assertThat(microServicesChain.get(0).getName()).isEqualTo("pmsh");
+    }
+
     private static JsonObject yamlToJson(String yamlString) {
         Yaml yaml = new Yaml();
         Map<String, Object> map = yaml.load(yamlString);
diff --git a/src/test/resources/clds/new-microservice.yaml b/src/test/resources/clds/new-microservice.yaml
new file mode 100644
index 0000000..70c1eda
--- /dev/null
+++ b/src/test/resources/clds/new-microservice.yaml
@@ -0,0 +1,46 @@
+tosca_definitions_version: cloudify_dsl_1_3
+ 
+imports:
+  - "http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml"
+  - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R5/k8splugin/1.4.13/k8splugin_types.yaml"
+  - "https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R5/clamppolicyplugin/1.0.0/clamppolicyplugin_types.yaml"
+
+inputs:
+  tag_version:
+    type: string
+    description: docker image
+  policy_model_id:
+    type: 'string'
+    default: 'onap.policies.monitoring.dcae-pm-initiation-handler'
+  policy_id:
+    type: 'string'
+    default: 'onap.policies.monitoring.dcae-pm-initiation-handler'
+
+node_templates:
+  pmsh:
+    relationships:
+      - type: cloudify.relationships.depends_on
+        target: pmsh-policy
+
+    interfaces:
+      cloudify.interfaces.lifecycle:
+        start:
+          inputs:
+            ports:
+              - '8443:0'
+              - '8081:0'
+    properties:
+      image:
+        get_input: tag_version
+      replicas: 1
+      service_component_type: "pmsh"
+      service_component_name_override: "pmsh"
+    type: dcae.nodes.ContainerizedServiceComponent
+
+  pmsh-policy:
+    type: clamp.nodes.policy
+    properties:
+      policy_model_id:
+        get_input: policy_model_id
+      policy_id:
+        get_input: policy_id
