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.DOMRpcAvailabilityListener;
19 import org.opendaylight.mdsal.dom.api.DOMRpcService;
20 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
22 public class ForwardingDOMRpcServiceTest extends ForwardingDOMRpcService {
24 @Mock(name = "domRpcService")
25 private DOMRpcService domRpcService;
28 public void basicTest() throws Exception {
31 final DOMRpcAvailabilityListener domRpcAvailabilityListener = mock(DOMRpcAvailabilityListener.class);
33 doReturn(null).when(domRpcService).invokeRpc(SchemaPath.SAME, null);
34 this.invokeRpc(SchemaPath.SAME, null);
35 verify(domRpcService).invokeRpc(SchemaPath.SAME, null);
37 doReturn(null).when(domRpcService).registerRpcListener(domRpcAvailabilityListener);
38 this.registerRpcListener(domRpcAvailabilityListener);
39 verify(domRpcService).registerRpcListener(domRpcAvailabilityListener);
44 protected DOMRpcService delegate() {