Bump versions to 0.21.8-SNAPSHOT
[bgpcep.git] / bgp / rib-impl / src / test / java / org / opendaylight / protocol / bgp / rib / impl / AbstractBGPSessionNegotiatorTest.java
1 /*
2  * Copyright (c) 2019 Pantheon Technologies, s.r.o. 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.rib.impl;
9
10 import static org.junit.Assert.assertEquals;
11 import static org.opendaylight.protocol.bgp.rib.impl.AbstractBGPSessionNegotiator.AS_TRANS;
12 import static org.opendaylight.protocol.bgp.rib.impl.AbstractBGPSessionNegotiator.openASNumber;
13
14 import org.junit.Test;
15 import org.opendaylight.yangtools.yang.common.Uint16;
16
17 public class AbstractBGPSessionNegotiatorTest {
18     @Test
19     public void testOpenASNumber() {
20         assertEquals(Uint16.ZERO, openASNumber(0));
21         assertEquals(Uint16.MAX_VALUE, openASNumber(65535));
22         assertEquals(AS_TRANS, openASNumber(65536));
23         assertEquals(AS_TRANS, openASNumber(Integer.MAX_VALUE));
24         assertEquals(AS_TRANS, openASNumber(2147483648L));
25         assertEquals(AS_TRANS, openASNumber(4294967295L));
26     }
27 }