diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
index 055968c..0c7f977 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/client/ASDCControllerITTest.java
@@ -148,138 +148,6 @@
     }
 
     /**
-     * Test with service-Testservice140-csar.csar.
-     */
-    @Test
-    public void treatNotification_ValidPnfResource_ExpectedOutput() {
-
-        /**
-         * service UUID/invariantUUID from global metadata in service-Testservice140-template.yml.
-         */
-        String serviceUuid = "efaea486-561f-4159-9191-a8d3cb346728";
-        String serviceInvariantUuid = "f2edfbf4-bb0a-4fe7-a57a-71362d4b0b23";
-
-        initMockAaiServer(serviceUuid, serviceInvariantUuid);
-
-        NotificationDataImpl notificationData = new NotificationDataImpl();
-        notificationData.setServiceUUID(serviceUuid);
-        notificationData.setDistributionID(distributionId);
-        notificationData.setServiceInvariantUUID(serviceInvariantUuid);
-        notificationData.setServiceVersion("1.0");
-
-        ResourceInfoImpl resourceInfo = constructPnfResourceInfo();
-        List<ResourceInfoImpl> resourceInfoList = new ArrayList<>();
-        resourceInfoList.add(resourceInfo);
-        notificationData.setResources(resourceInfoList);
-
-        ArtifactInfoImpl artifactInfo = constructPnfServiceArtifact();
-        List<ArtifactInfoImpl> artifactInfoList = new ArrayList<>();
-        artifactInfoList.add(artifactInfo);
-        notificationData.setServiceArtifacts(artifactInfoList);
-
-        try {
-            asdcController.treatNotification(notificationData);
-            logger.info("Checking the database for PNF ingestion");
-
-            /**
-             * Check the tosca csar entity, it should be the same as provided from NotficationData.
-             */
-            ToscaCsar toscaCsar = toscaCsarRepository.findById(artifactUuid)
-                    .orElseThrow(() -> new EntityNotFoundException("Tosca csar: " + artifactUuid + " not found"));
-            assertEquals("tosca csar UUID", artifactUuid, toscaCsar.getArtifactUUID());
-            assertEquals("tosca csar name", "service-Testservice140-csar.csar", toscaCsar.getName());
-            assertEquals("tosca csar version", "1.0", toscaCsar.getVersion());
-            assertNull("tosca csar descrption", toscaCsar.getDescription());
-            assertEquals("tosca csar checksum", "MANUAL_RECORD", toscaCsar.getArtifactChecksum());
-            assertEquals("toscar csar URL", "/download/service-Testservice140-csar.csar", toscaCsar.getUrl());
-
-            /**
-             * Check the service entity, it should be the same as global metadata information in
-             * service-Testservice140-template.yml inside csar.
-             */
-            Service service = serviceRepository.findById(serviceUuid)
-                    .orElseThrow(() -> new EntityNotFoundException("Service: " + serviceUuid + " not found"));
-            assertEquals("model UUID", "efaea486-561f-4159-9191-a8d3cb346728", service.getModelUUID());
-            assertEquals("model name", "TestService140", service.getModelName());
-            assertEquals("model invariantUUID", "f2edfbf4-bb0a-4fe7-a57a-71362d4b0b23",
-                    service.getModelInvariantUUID());
-            assertEquals("model version", "1.0", service.getModelVersion());
-            assertEquals("description", "Test Service for extended attributes of PNF resource",
-                    service.getDescription().trim());
-            assertEquals("tosca csar artifact UUID", artifactUuid, service.getCsar().getArtifactUUID());
-            assertEquals("service type", "Network", service.getServiceType());
-            assertEquals("service role", "nfv", service.getServiceRole());
-            assertEquals("environment context", "General_Revenue-Bearing", service.getEnvironmentContext());
-            assertEquals("service category", "Network Service", service.getCategory());
-            assertNull("workload context", service.getWorkloadContext());
-            assertEquals("resource order", "Test140PNF", service.getResourceOrder());
-
-            /**
-             * Check PNF resource, it should be the same as metadata in the topology template in
-             * service-Testservice140-template.yml OR global metadata in the resource-Test140pnf-template.yml
-             */
-            String pnfResourceKey = "9c54e269-122b-4e8a-8b2a-6eac849b441a";
-            PnfResource pnfResource = pnfResourceRepository.findById(pnfResourceKey)
-                    .orElseThrow(() -> new EntityNotFoundException("PNF resource:" + pnfResourceKey + " not found"));
-            assertNull("orchestration mode", pnfResource.getOrchestrationMode());
-            assertEquals("Description", "Oracle", pnfResource.getDescription().trim());
-            assertEquals("model UUID", pnfResourceKey, pnfResource.getModelUUID());
-            assertEquals("model invariant UUID", "d832a027-75f3-455d-9de4-f02fcdee7e7e",
-                    pnfResource.getModelInvariantUUID());
-            assertEquals("model version", "1.0", pnfResource.getModelVersion());
-            assertEquals("model name", "Test140PNF", pnfResource.getModelName());
-            assertEquals("tosca node type", "org.openecomp.resource.pnf.Test140pnf", pnfResource.getToscaNodeType());
-            assertEquals("resource category", "Application L4+", pnfResource.getCategory());
-            assertEquals("resource sub category", "Call Control", pnfResource.getSubCategory());
-
-            /**
-             * Check PNF resource customization, it should be the same as metadata in the topology template in
-             * service-Testservice140-template.yml OR global metadata in the resource-Test140pnf-template.yml
-             */
-            String pnfCustomizationKey = "428a3d73-f962-4cc2-ba62-2483c45d6b12";
-            PnfResourceCustomization pnfCustomization = pnfCustomizationRepository.findById(pnfCustomizationKey)
-                    .orElseThrow(() -> new EntityNotFoundException(
-                            "PNF resource customization: " + pnfCustomizationKey + " not found"));
-            assertEquals("model customizationUUID", pnfCustomizationKey, pnfCustomization.getModelCustomizationUUID());
-            assertEquals("model instance name", "Test140PNF 0", pnfCustomization.getModelInstanceName());
-            assertEquals("NF type", "", pnfCustomization.getNfType());
-            assertEquals("NF Role", "nf", pnfCustomization.getNfRole());
-            assertEquals("NF function", "nf", pnfCustomization.getNfFunction());
-            assertEquals("NF naming code", "", pnfCustomization.getNfNamingCode());
-            assertEquals("PNF resource model UUID", pnfResourceKey, pnfCustomization.getPnfResources().getModelUUID());
-            assertEquals("Multi stage design", "", pnfCustomization.getMultiStageDesign());
-            assertNull("resource input", pnfCustomization.getResourceInput());
-            assertEquals("cds blueprint name(sdnc_model_name property)", pnfCustomization.getBlueprintName(),
-                    pnfCustomization.getBlueprintName());
-            assertEquals("cds blueprint version(sdnc_model_version property)", pnfCustomization.getBlueprintVersion(),
-                    pnfCustomization.getBlueprintVersion());
-
-            /**
-             * Check the pnf resource customization with service mapping
-             */
-            List<PnfResourceCustomization> pnfCustList = service.getPnfCustomizations();
-            assertEquals("PNF resource customization entity", 1, pnfCustList.size());
-            assertEquals(pnfCustomizationKey, pnfCustList.get(0).getModelCustomizationUUID());
-
-            /**
-             * Check the watchdog for component distribution status
-             */
-            List<WatchdogComponentDistributionStatus> distributionList =
-                    watchdogCDStatusRepository.findByDistributionId(this.distributionId);
-            assertNotNull(distributionList);
-            assertEquals(1, distributionList.size());
-            WatchdogComponentDistributionStatus distributionStatus = distributionList.get(0);
-            assertEquals("COMPONENT_DONE_OK", distributionStatus.getComponentDistributionStatus());
-            assertEquals("SO", distributionStatus.getComponentName());
-
-
-        } catch (Exception e) {
-            logger.info(e.getMessage(), e);
-            fail(e.getMessage());
-        }
-    }
-
-    /**
      * Test to check RequestId is being set using the DistributionID.
      */
     @Test
diff --git a/asdc-controller/src/test/resources/download/service-Svc140-VF-csar.csar b/asdc-controller/src/test/resources/download/service-Svc140-VF-csar.csar
deleted file mode 100644
index 0de1b0b..0000000
--- a/asdc-controller/src/test/resources/download/service-Svc140-VF-csar.csar
+++ /dev/null
Binary files differ
diff --git a/asdc-controller/src/test/resources/download/service-Testservice140-csar.csar b/asdc-controller/src/test/resources/download/service-Testservice140-csar.csar
deleted file mode 100644
index bd9a1dc..0000000
--- a/asdc-controller/src/test/resources/download/service-Testservice140-csar.csar
+++ /dev/null
Binary files differ
