Fix odlparent-3.0.0 checkstyle issues
[mdsal.git] / dom / mdsal-dom-spi / src / test / java / org / opendaylight / mdsal / dom / spi / ForwardingDOMRpcResultTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.mdsal.dom.spi;
9
10 import static org.mockito.Mockito.doReturn;
11 import static org.mockito.Mockito.verify;
12 import static org.mockito.MockitoAnnotations.initMocks;
13
14 import javax.annotation.Nonnull;
15 import org.junit.Test;
16 import org.mockito.Mock;
17 import org.opendaylight.mdsal.dom.api.DOMRpcResult;
18
19 public class ForwardingDOMRpcResultTest extends ForwardingDOMRpcResult {
20
21     @Mock(name = "domRpcResult")
22     private DOMRpcResult domRpcResult;
23
24     @Test
25     public void basicTest() throws Exception {
26         initMocks(this);
27
28         doReturn(null).when(domRpcResult).getErrors();
29         this.getErrors();
30         verify(domRpcResult).getErrors();
31
32         doReturn(null).when(domRpcResult).getResult();
33         this.getResult();
34         verify(domRpcResult).getResult();
35     }
36
37     @Nonnull
38     @Override
39     protected DOMRpcResult delegate() {
40         return domRpcResult;
41     }
42 }