Fix checkstyle and spotbug violations of other modules
[unimgr.git] / cisco-xr-driver / src / test / java / org / opendaylight / unimgr / mef / nrp / cisco / xr / l2vpn / helper / L2vpnHelperTest.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.unimgr.mef.nrp.cisco.xr.l2vpn.helper;
9
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertNotNull;
12
13 import org.junit.Test;
14 import org.mockito.Mockito;
15 import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.l2vpn.cfg.rev151109.L2vpn;
16 import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.l2vpn.cfg.rev151109.l2vpn.Database;
17 import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.l2vpn.cfg.rev151109.l2vpn.database.XconnectGroups;
18
19
20 /*
21  * @author krzysztof.bijakowski@amartus.com
22  */
23 public class L2vpnHelperTest {
24
25     @Test
26     public void build() {
27         //given
28         XconnectGroups xconnectGroups =  Mockito.mock(XconnectGroups.class);
29
30         //when
31         L2vpn actual = L2vpnHelper.build(xconnectGroups);
32
33         //then
34         Database actualDatabase = actual.getDatabase();
35         assertNotNull(actualDatabase);
36
37         XconnectGroups actualXconnectGroups = actualDatabase.getXconnectGroups();
38         assertEquals(xconnectGroups, actualXconnectGroups);
39     }
40 }