Code clean up
[bgpcep.git] / bgp / l3vpn / src / test / java / org / opendaylight / protocol / bgp / l3vpn / BGPActivatorTest.java
1 /*
2  * Copyright (c) 2018 AT&T Intellectual Property. 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
9 package org.opendaylight.protocol.bgp.l3vpn;
10
11 import static org.junit.Assert.assertEquals;
12 import static org.junit.Assert.assertNull;
13
14 import org.junit.Test;
15 import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
16 import org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.l3vpn.mcast.rev180417.McastMplsLabeledVpnSubsequentAddressFamily;
18
19 public final class BGPActivatorTest {
20     @Test
21     public void testActivator() {
22         final BGPActivator act = new BGPActivator();
23         final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
24         assertNull(context.getSubsequentAddressFamilyRegistry().classForFamily(BGPActivator.MCAST_L3VPN_SAFI));
25         act.start(context);
26         assertEquals(McastMplsLabeledVpnSubsequentAddressFamily.class, context.getSubsequentAddressFamilyRegistry()
27                 .classForFamily(BGPActivator.MCAST_L3VPN_SAFI));
28         act.close();
29     }
30 }