Technical debt - fix SH deprecated warnings
[transportpce.git] / servicehandler / src / test / java / org / opendaylight / transportpce / servicehandler / service / RendererServiceWrapperTest.java
index c8aeeef8ca97bbad408ac3fc907f1657dc43ccd6..162ef16bab6966c238e0ec727ee2d24a1977b422 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.transportpce.servicehandler.service;
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
 
 import com.google.common.util.concurrent.ListenableFuture;
 import org.junit.Assert;
@@ -26,9 +25,9 @@ import org.opendaylight.transportpce.servicehandler.ModelMappingUtils;
 import org.opendaylight.transportpce.servicehandler.ServiceInput;
 import org.opendaylight.transportpce.servicehandler.utils.ServiceDataUtils;
 import org.opendaylight.transportpce.test.AbstractTest;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteInputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutput;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017.ServiceDeleteOutputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520.ServiceDeleteInputBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520.ServiceDeleteOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520.ServiceDeleteOutputBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceNotificationTypes;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
@@ -58,33 +57,33 @@ public class RendererServiceWrapperTest extends AbstractTest {
     @Test
     public void performRendererNullServiceHandlerHeader() {
         ServiceDeleteInput input = ServiceDataUtils.buildServiceDeleteInput();
-        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer
-            .rev171017.ServiceDeleteInput serviceDeleteInput =
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520.ServiceDeleteInput
+            serviceDeleteInput =
                 ModelMappingUtils.createServiceDeleteInput(new ServiceInput(input));
         serviceDeleteInput = new ServiceDeleteInputBuilder(serviceDeleteInput).setServiceHandlerHeader(null).build();
         ServiceDeleteOutput response = this.rendererServiceWrapperMock.performRenderer(serviceDeleteInput,
-                ServiceNotificationTypes.ServiceDeleteResult);
+                ServiceNotificationTypes.ServiceDeleteResult, null);
         Assert.assertEquals(ResponseCodes.FINAL_ACK_YES,
                 response.getConfigurationResponseCommon().getAckFinalIndicator());
         Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
                 response.getConfigurationResponseCommon().getResponseCode());
-        verifyZeroInteractions(this.rendererServiceOperationsMock);
+        Mockito.verifyNoInteractions(this.rendererServiceOperationsMock);
     }
 
     @Test
     public void performRendererNullServiceName() {
         ServiceDeleteInput input = ServiceDataUtils.buildServiceDeleteInput();
-        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer
-            .rev171017.ServiceDeleteInput serviceDeleteInput =
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520.ServiceDeleteInput
+            serviceDeleteInput =
                 ModelMappingUtils.createServiceDeleteInput(new ServiceInput(input));
         serviceDeleteInput = new ServiceDeleteInputBuilder(serviceDeleteInput).setServiceName(null).build();
         ServiceDeleteOutput response = this.rendererServiceWrapperMock.performRenderer(serviceDeleteInput,
-                ServiceNotificationTypes.ServiceDeleteResult);
+                ServiceNotificationTypes.ServiceDeleteResult, null);
         Assert.assertEquals(ResponseCodes.FINAL_ACK_YES,
                 response.getConfigurationResponseCommon().getAckFinalIndicator());
         Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
                 response.getConfigurationResponseCommon().getResponseCode());
-        verifyZeroInteractions(this.rendererServiceOperationsMock);
+        Mockito.verifyNoInteractions(this.rendererServiceOperationsMock);
     }
 
     @Test
@@ -97,7 +96,7 @@ public class RendererServiceWrapperTest extends AbstractTest {
                 response.getConfigurationResponseCommon().getAckFinalIndicator());
         Assert.assertEquals(ResponseCodes.RESPONSE_FAILED,
                 response.getConfigurationResponseCommon().getResponseCode());
-        verifyZeroInteractions(this.rendererServiceOperationsMock);
+        Mockito.verifyNoInteractions(this.rendererServiceOperationsMock);
     }
 
 
@@ -111,14 +110,14 @@ public class RendererServiceWrapperTest extends AbstractTest {
                 .setConfigurationResponseCommon(configurationResponseCommon).build();
         ListenableFuture<ServiceDeleteOutput> response = ServiceDataUtils.returnFuture(output);
         Mockito.when(this.rendererServiceOperationsMock.serviceDelete(any(
-                org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
-                .ServiceDeleteInput.class))).thenReturn(response);
+                org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520
+                .ServiceDeleteInput.class), any())).thenReturn(response);
         ServiceDeleteInput input = ServiceDataUtils.buildServiceDeleteInput();
-        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer
-            .rev171017.ServiceDeleteInput serviceDeleteInput =
+        org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520.ServiceDeleteInput
+            serviceDeleteInput =
                 ModelMappingUtils.createServiceDeleteInput(new ServiceInput(input));
         ServiceDeleteOutput rendereResponse = this.rendererServiceWrapperMock.performRenderer(serviceDeleteInput,
-                ServiceNotificationTypes.ServiceDeleteResult);
+                ServiceNotificationTypes.ServiceDeleteResult, null);
         Assert.assertEquals(ResponseCodes.FINAL_ACK_NO,
                 rendereResponse.getConfigurationResponseCommon().getAckFinalIndicator());
         Assert.assertEquals(ResponseCodes.RESPONSE_OK,
@@ -126,8 +125,8 @@ public class RendererServiceWrapperTest extends AbstractTest {
         Assert.assertEquals("Renderer service delete in progress",
                 rendereResponse.getConfigurationResponseCommon().getResponseMessage());
         verify(this.rendererServiceOperationsMock).serviceDelete(any(
-                org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
-                        .ServiceDeleteInput.class));
+                org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520
+                        .ServiceDeleteInput.class), any());
     }
 
     @Test
@@ -140,8 +139,8 @@ public class RendererServiceWrapperTest extends AbstractTest {
                 .setConfigurationResponseCommon(configurationResponseCommon).build();
         ListenableFuture<ServiceDeleteOutput> response = ServiceDataUtils.returnFuture(output);
         Mockito.when(this.rendererServiceOperationsMock.serviceDelete(any(
-                org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev171017
-                .ServiceDeleteInput.class))).thenReturn(response);
+                org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520
+                .ServiceDeleteInput.class), any())).thenReturn(response);
         TempServiceDeleteInput input = ServiceDataUtils.buildTempServiceDeleteInput();
         ServiceDeleteOutput rendereResponse = this.rendererServiceWrapperMock.performRenderer(input,
                 ServiceNotificationTypes.ServiceDeleteResult);
@@ -152,7 +151,7 @@ public class RendererServiceWrapperTest extends AbstractTest {
         Assert.assertEquals("Renderer service delete in progress",
                 rendereResponse.getConfigurationResponseCommon().getResponseMessage());
         verify(this.rendererServiceOperationsMock).serviceDelete(any(
-                org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer
-                    .rev171017.ServiceDeleteInput.class));
+                org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520.ServiceDeleteInput
+                    .class), any());
     }
 }