/* * Copyright © 2020 Orange Labs, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.transportpce.pce.impl; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.opendaylight.mdsal.binding.api.RpcProviderService; import org.opendaylight.transportpce.pce.service.PathComputationService; import org.opendaylight.transportpce.test.AbstractTest; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.TransportpcePceService; @ExtendWith(MockitoExtension.class) public class PceProviderTest extends AbstractTest { @Mock private RpcProviderService rpcService; @Mock private PathComputationService pathComputationService; @Mock private TransportpcePceService pceServiceRPCImpl; @Test void testInit() { new PceProvider(rpcService, pathComputationService, pceServiceRPCImpl); verify(rpcService, times(1)).registerRpcImplementation(any(), any(TransportpcePceService.class)); } }