Merge "Unit test coverage"
[so.git] / mso-api-handlers / mso-api-handler-infra / src / test / java / org / openecomp / mso / apihandlerinfra / VnfRequestHandlerTest.java
index 205bb8d..e166119 100644 (file)
@@ -58,19 +58,24 @@ public class VnfRequestHandlerTest {
                f1.setAccessible(true);
         f1.set(handler, uriInfo);
        }
-       
+
        @Test
        public void manageVnfRequestTestV2(){
+               Mockito.when(uriInfo.getRequestUri()).thenReturn(URI.create("http://localhost:8080/test"));
                Response resp = handler.manageVnfRequest("<name>Test</name>", "v2");
                assertTrue(null != resp);
        }
+
        @Test
        public void manageVnfRequestTestv1(){
+               Mockito.when(uriInfo.getRequestUri()).thenReturn(URI.create("http://localhost:8080/test"));
                Response resp = handler.manageVnfRequest("<name>Test</name>", "v1");
                assertTrue(null != resp);
        }
+
        @Test
        public void manageVnfRequestTestv3(){
+               Mockito.when(uriInfo.getRequestUri()).thenReturn(URI.create("http://localhost:8080/test"));
                Response resp = handler.manageVnfRequest("<name>Test</name>", "v3");
                assertTrue(null != resp);
        }
@@ -177,7 +182,7 @@ public class VnfRequestHandlerTest {
                        public List <InfraActiveRequests> getRequestListFromInfraActive (String queryAttributeName,
                     String queryValue,
                     String requestType) {
-                               List <InfraActiveRequests> list = new ArrayList<InfraActiveRequests>();
+                               List <InfraActiveRequests> list = new ArrayList<>();
                                InfraActiveRequests req = new InfraActiveRequests();
                                req.setAaiServiceId("299392");
                                req.setAction("CREATE");
@@ -202,7 +207,7 @@ public class VnfRequestHandlerTest {
                        public List <InfraActiveRequests> getRequestListFromInfraActive (String queryAttributeName,
                     String queryValue,
                     String requestType) {
-                               List <InfraActiveRequests> list = new ArrayList<InfraActiveRequests>();
+                               List <InfraActiveRequests> list = new ArrayList<>();
                                InfraActiveRequests req = new InfraActiveRequests();
                                req.setAaiServiceId("299392");
                                req.setAction("CREATE");