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;
12 import static org.mockito.MockitoAnnotations.initMocks;
16 import org.junit.Test;
17 import org.mockito.Mock;
18 import org.opendaylight.mdsal.dom.api.DOMRpcIdentifier;
19 import org.opendaylight.mdsal.dom.api.DOMRpcImplementation;
20 import org.opendaylight.mdsal.dom.api.DOMRpcImplementationRegistration;
21 import org.opendaylight.yangtools.concepts.Registration;
23 public class AbstractDOMRpcProviderServiceTest extends AbstractDOMRpcProviderService {
25 @Mock(name = "domRpcImplementationRegistration")
26 private DOMRpcImplementationRegistration domRpcImplementationRegistration;
29 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;
42 public Registration registerRpcImplementations(Map<DOMRpcIdentifier, DOMRpcImplementation> map) {
43 throw new UnsupportedOperationException();