/* * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.protocol.bgp.mvpn.impl; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.opendaylight.protocol.bgp.mvpn.impl.BGPActivator.MVPN_SAFI; import org.junit.Test; import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext; import org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mvpn.rev200120.McastVpnSubsequentAddressFamily; public final class BGPActivatorTest { @Test public void testActivator() { final BGPActivator act = new BGPActivator(); final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext(); assertNull(context.getSubsequentAddressFamilyRegistry().classForFamily(MVPN_SAFI)); act.start(context); assertEquals(McastVpnSubsequentAddressFamily.VALUE, context.getSubsequentAddressFamilyRegistry() .classForFamily(MVPN_SAFI)); } }