- requestProcessor = Mockito.mock(RequestProcessor.class);
- networkTransaction = new NetworkTransactionImpl(requestProcessor);
- pathComputationService = new PathComputationServiceImpl(networkTransaction, notificationPublishService);
- pceServiceRPC = new PceServiceRPCImpl(pathComputationService);
+ networkTransaction = new NetworkTransactionImpl(getDataBroker());
+ pathComputationService = new PathComputationServiceImpl(networkTransaction, notificationPublishService,
+ null, portMapping);
+ }
+
+ @Test
+ void testRpcRegistration() {
+ new PceServiceRPCImpl(rpcProviderService, pathComputationService);
+ verify(rpcProviderService, times(1)).registerRpcImplementations(
+ any(CancelResourceReserveImpl.class), any(PathComputationRequestImpl.class),
+ any(PathComputationRerouteRequestImpl.class));
+ }
+
+ @Test
+ void testCancelResourceReserve() {
+ assertNotNull(new CancelResourceReserveImpl(pathComputationService)
+ .invoke(new CancelResourceReserveInputBuilder().build()));