Enforce findbug and checkstyle under l3vpn
[bgpcep.git] / bgp / l3vpn / src / test / java / org / opendaylight / protocol / bgp / l3vpn / ipv4 / BgpIpv4ActivatorTest.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.l3vpn.ipv4;
9
10 import static org.junit.Assert.assertFalse;
11 import static org.junit.Assert.assertTrue;
12
13 import org.junit.Test;
14 import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
15 import org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext;
16
17 public class BgpIpv4ActivatorTest {
18
19     @Test
20     public void testActivator() throws Exception {
21         final BgpIpv4Activator act = new BgpIpv4Activator();
22         final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
23         assertFalse(context.getNlriRegistry().getSerializers().iterator().hasNext());
24         act.start(context);
25         assertTrue(context.getNlriRegistry().getSerializers().iterator().next() instanceof VpnIpv4NlriParser);
26         act.close();
27     }
28 }