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.protocol.bgp.state;
10 import static org.junit.Assert.assertNull;
11 import static org.mockito.Mockito.doReturn;
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;
20 public class PeerGroupUtilTest {
22 private BGPPeerState bgpPeerState;
25 public void setUp() throws Exception {
26 MockitoAnnotations.initMocks(this);
27 doReturn(null).when(this.bgpPeerState).getGroupId();
31 public void testNoneGroup() {
32 assertNull(PeerGroupUtil.buildPeerGroups(Collections.singletonList(this.bgpPeerState)));