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.mockito.Mockito.doReturn;
11 import static org.mockito.Mockito.mock;
12 import static org.mockito.Mockito.verify;
13 import static org.mockito.MockitoAnnotations.initMocks;
15 import javax.annotation.Nonnull;
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;
21 public class ForwardingDOMRpcImplementationTest extends ForwardingDOMRpcImplementation {
23 @Mock(name = "domRpcImplementation")
24 private DOMRpcImplementation domRpcImplementation;
27 public void basicTest() throws Exception {
30 final DOMRpcIdentifier domRpcIdentifier = mock(DOMRpcIdentifier.class);
32 doReturn(null).when(domRpcImplementation).invokeRpc(domRpcIdentifier, null);
33 this.invokeRpc(domRpcIdentifier, null);
34 verify(domRpcImplementation).invokeRpc(domRpcIdentifier, null);
39 protected DOMRpcImplementation delegate() {
40 return domRpcImplementation;