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.Ignore;
16 import org.junit.Test;
17 import org.mockito.Mock;
18 import org.mockito.MockitoAnnotations;
19 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
20 import org.opendaylight.mdsal.binding.api.RpcProviderService;
21 import org.opendaylight.transportpce.pce.service.PathComputationService;
22 import org.opendaylight.transportpce.renderer.NetworkModelWavelengthService;
23 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
24 import org.opendaylight.transportpce.test.AbstractTest;
27 public class ServicehandlerProviderTest extends AbstractTest {
30 private PathComputationService pathComputationService;
33 private RendererServiceOperations rendererServiceOperations;
36 private NotificationPublishService notificationPublishService;
39 RpcProviderService rpcProviderRegistry;
42 NetworkModelWavelengthService networkModelWavelengthService;
46 MockitoAnnotations.initMocks(this);
51 public void testInitRegisterServiceHandlerToRpcRegistry() {
52 ServicehandlerProvider provider = new ServicehandlerProvider(
53 getDataBroker(), rpcProviderRegistry,
54 getNotificationService() , pathComputationService,
55 rendererServiceOperations, networkModelWavelengthService,
56 notificationPublishService);
60 verify(rpcProviderRegistry, times(1))
61 .registerRpcImplementation(any(), any(ServicehandlerImpl.class));