2 * Copyright (c) 2016 Cisco Systems, 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.mdsal.dom.spi;
10 import static org.junit.Assert.assertEquals;
11 import static org.mockito.Mockito.mock;
15 import org.junit.Test;
16 import org.junit.runner.RunWith;
17 import org.mockito.Mock;
18 import org.mockito.junit.MockitoJUnitRunner;
19 import org.opendaylight.mdsal.dom.api.DOMRpcIdentifier;
20 import org.opendaylight.mdsal.dom.api.DOMRpcImplementation;
21 import org.opendaylight.mdsal.dom.api.DOMRpcImplementationRegistration;
22 import org.opendaylight.yangtools.concepts.Registration;
24 @RunWith(MockitoJUnitRunner.StrictStubs.class)
25 public class AbstractDOMRpcProviderServiceTest extends AbstractDOMRpcProviderService {
26 @Mock(name = "domRpcImplementationRegistration")
27 public DOMRpcImplementationRegistration<?> domRpcImplementationRegistration;
30 public void registerRpcImplementation() throws Exception {
31 assertEquals(domRpcImplementationRegistration, this.registerRpcImplementation(
32 mock(DOMRpcImplementation.class)));
36 public <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(
37 final T implementation, final Set<DOMRpcIdentifier> rpcs) {
38 return (DOMRpcImplementationRegistration<T>) domRpcImplementationRegistration;
42 public Registration registerRpcImplementations(final Map<DOMRpcIdentifier, DOMRpcImplementation> map) {
43 throw new UnsupportedOperationException();