2 * Copyright (c) 2013 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.rib.impl;
10 import static org.junit.Assert.assertEquals;
11 import static org.junit.Assert.assertNull;
13 import org.junit.Test;
14 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPSessionPreferences;
15 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber;
17 public class ApiTest {
20 public void testBGPSessionPreferences() {
21 final BGPSessionPreferences sp = new BGPSessionPreferences(new AsNumber(58L), (short) 5, null, null);
22 assertNull(sp.getBgpId());
23 assertEquals((short) 5, sp.getHoldTime());
24 assertEquals(new AsNumber(58L), sp.getMyAs());