Bump upstream dependencies to Ca
[transportpce.git] / pce / src / test / java / org / opendaylight / transportpce / pce / impl / PceServiceRPCImplTest.java
index f727565746af27765200baa1f976f08ecb9b59c8..edf5efa06008b038cb7d56d8119a58b0094088a4 100644 (file)
@@ -39,7 +39,6 @@ public class PceServiceRPCImplTest extends AbstractTest {
     private PathComputationService pathComputationService;
     private NotificationPublishService notificationPublishService;
     private NetworkTransactionImpl networkTransaction;
-    private PceServiceRPCImpl pceServiceRPC;
     @Mock
     private PortMapping portMapping;
     @Mock
@@ -54,33 +53,35 @@ public class PceServiceRPCImplTest extends AbstractTest {
         networkTransaction =  new NetworkTransactionImpl(getDataBroker());
         pathComputationService = new PathComputationServiceImpl(networkTransaction, notificationPublishService,
                 null, portMapping);
-        pceServiceRPC = new PceServiceRPCImpl(rpcProviderService, pathComputationService);
     }
 
     @Test
     void testRpcRegistration() {
+        new PceServiceRPCImpl(rpcProviderService, pathComputationService);
         verify(rpcProviderService, times(1)).registerRpcImplementations(any());
     }
 
     @Test
     void testCancelResourceReserve() {
-        CancelResourceReserveInputBuilder cancelResourceReserveInput = new CancelResourceReserveInputBuilder();
-        assertNotNull(pceServiceRPC.cancelResourceReserve(cancelResourceReserveInput.build()));
+        assertNotNull(new CancelResourceReserveImpl(pathComputationService)
+                .invoke(new CancelResourceReserveInputBuilder().build()));
     }
 
     @Test
     void testPathComputationRequest() {
-        assertNotNull(pceServiceRPC.pathComputationRequest(PceTestData.getPCERequest()));
+        assertNotNull(new PathComputationRequestImpl(pathComputationService)
+                .invoke(PceTestData.getPCERequest()));
     }
 
     @Test
     void testPathComputationRerouteRequest() {
-        assertNotNull(pceServiceRPC.pathComputationRerouteRequest(PceTestData.getPCERerouteRequest()));
+        assertNotNull(new PathComputationRerouteRequestImpl(pathComputationService)
+                .invoke(PceTestData.getPCERerouteRequest()));
     }
 
     @Test
     void testPathComputationRequestCoRoutingOrGeneral2() {
-        assertNotNull(
-            pceServiceRPC.pathComputationRequest(PceTestData.getPathComputationRequestInputWithCoRoutingOrGeneral2()));
+        assertNotNull(new PathComputationRequestImpl(pathComputationService)
+                .invoke(PceTestData.getPathComputationRequestInputWithCoRoutingOrGeneral2()));
     }
 }