Add terminate UT for vf-c adapter

Add terminate UT for vf-c adapter api

Change-Id: Iab514bb59b112f30e5911fb04c3b9d6672494ae7
Issue-ID:SO-133
Signed-off-by: c00149107 <chenchuanyu@huawei.com>
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcAdapterRest.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcAdapterRest.java
index 438393b..f4c2953 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcAdapterRest.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcAdapterRest.java
@@ -22,6 +22,7 @@
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
@@ -92,7 +93,7 @@
      * @return response
      * @since ONAP Amsterdam Release
      */
-    @POST
+    @DELETE
     @Path("/ns/{nsInstanceId}")
     @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
     @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java b/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java
index dc07a3c..f17c721 100644
--- a/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java
+++ b/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java
@@ -101,7 +101,10 @@
                     return getResponse("instantiateNsRsp.json");
                 } else if(methodType.equals(CommonConstant.MethodType.DELETE)) {
                     return getResponse(null);
-                }else {
+                } else if(url.contains("terminate") && methodType.equals(CommonConstant.MethodType.POST)) {
+                    return getResponse("terminateNsRsp.json");
+                }
+                else {
                     return null;
                 }
             }
@@ -193,7 +196,8 @@
 
     @Test
     public void terminateTest() {
-
+        mockRestfulUtil(FILE_PATH + "terminateNsReq.json");
+        vfcAdapter.terminateNfvoNs(null, "9b9f02c0-298b-458a-bc9c-be3692e4f354");
     }
 
     @Test
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json b/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json
index 4f7c29f..ac095e6 100644
--- a/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json
+++ b/adapters/mso-vfc-adapter/src/test/resources/json/terminateNsReq.json
@@ -1,4 +1,6 @@
 {
+    "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350",
+    "serviceType":"service",
     "serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351",
     "operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352",
     "nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353"