2 * Copyright © 2019 Orange, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.transportpce.servicehandler.impl;
10 import static org.mockito.ArgumentMatchers.any;
11 import static org.mockito.Mockito.times;
12 import static org.mockito.Mockito.verify;
14 import org.junit.Before;
15 import org.junit.Test;
16 import org.mockito.Mock;
17 import org.mockito.MockitoAnnotations;
18 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
19 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
20 import org.opendaylight.transportpce.pce.service.PathComputationService;
21 import org.opendaylight.transportpce.renderer.NetworkModelWavelengthService;
22 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
23 import org.opendaylight.transportpce.test.AbstractTest;
26 public class ServicehandlerProviderTest extends AbstractTest {
29 private PathComputationService pathComputationService;
32 private RendererServiceOperations rendererServiceOperations;
35 private NotificationPublishService notificationPublishService;
38 RpcProviderRegistry rpcProviderRegistry;
41 NetworkModelWavelengthService networkModelWavelengthService;
45 MockitoAnnotations.initMocks(this);
50 public void testInitRegisterServiceHandlerToRpcRegistry() {
51 ServicehandlerProvider provider = new ServicehandlerProvider(
52 getDataBroker(), rpcProviderRegistry,
53 getNotificationService() , pathComputationService,
54 rendererServiceOperations, networkModelWavelengthService,
55 notificationPublishService);
59 verify(rpcProviderRegistry, times(1))
60 .addRpcImplementation(any(), any(ServicehandlerImpl.class));