Modernize codebase a bit
[bgpcep.git] / bgp / openconfig-state / src / test / java / org / opendaylight / protocol / bgp / state / PeerGroupUtilTest.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.protocol.bgp.state;
9
10 import static org.junit.Assert.assertNull;
11 import static org.mockito.Mockito.doReturn;
12
13 import java.util.Collections;
14 import org.junit.Before;
15 import org.junit.Test;
16 import org.mockito.Mock;
17 import org.mockito.MockitoAnnotations;
18 import org.opendaylight.protocol.bgp.rib.spi.state.BGPPeerState;
19
20 public class PeerGroupUtilTest {
21     @Mock
22     private BGPPeerState bgpPeerState;
23
24     @Before
25     public void setUp() throws Exception {
26         MockitoAnnotations.initMocks(this);
27         doReturn(null).when(this.bgpPeerState).getGroupId();
28     }
29
30     @Test
31     public void testNoneGroup() {
32         assertNull(PeerGroupUtil.buildPeerGroups(Collections.singletonList(this.bgpPeerState)));
33     }
34 }