Modernize codebase a bit
[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
16 public class AbstractBGPSessionNegotiatorTest {
17     @Test
18     public void testOpenASNumber() {
19         assertEquals(0, openASNumber(0));
20         assertEquals(65535, openASNumber(65535));
21         assertEquals(AS_TRANS, openASNumber(65536));
22         assertEquals(AS_TRANS, openASNumber(Integer.MAX_VALUE));
23         assertEquals(AS_TRANS, openASNumber(2147483648L));
24         assertEquals(AS_TRANS, openASNumber(4294967295L));
25     }
26 }