Code clean up
[bgpcep.git] / bgp / extensions / mvpn / src / test / java / org / opendaylight / protocol / bgp / mvpn / impl / 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.mvpn.impl;
10
11 import static org.junit.Assert.assertEquals;
12 import static org.junit.Assert.assertNull;
13 import static org.opendaylight.protocol.bgp.mvpn.impl.BGPActivator.MVPN_SAFI;
14
15 import org.junit.Test;
16 import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
17 import org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.rev180417.McastVpnSubsequentAddressFamily;
19
20 public final class BGPActivatorTest {
21     @Test
22     public void testActivator() {
23         final BGPActivator act = new BGPActivator();
24         final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
25         assertNull(context.getSubsequentAddressFamilyRegistry().classForFamily(MVPN_SAFI));
26         act.start(context);
27         assertEquals(McastVpnSubsequentAddressFamily.class, context.getSubsequentAddressFamilyRegistry()
28                 .classForFamily(MVPN_SAFI));
29         act.close();
30     }
31 }