use of org.opendaylight.protocol.bgp.parser.impl.BGPActivator in project bgpcep by opendaylight.
the class BmpDispatcherImplTest method setUp.
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
doNothing().when(this.mockedSession).handlerRemoved(any(ChannelHandlerContext.class));
doNothing().when(this.mockedSession).handlerAdded(any(ChannelHandlerContext.class));
doNothing().when(this.mockedSession).channelRegistered(any(ChannelHandlerContext.class));
doNothing().when(this.mockedSession).channelActive(any(ChannelHandlerContext.class));
doNothing().when(this.mockedSession).channelInactive(any(ChannelHandlerContext.class));
doNothing().when(this.mockedSession).channelUnregistered(any(ChannelHandlerContext.class));
doNothing().when(this.mockedSession).channelReadComplete(any(ChannelHandlerContext.class));
this.bgpActivator = new BGPActivator();
final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
this.bgpActivator.start(context);
final SimpleBmpExtensionProviderContext ctx = new SimpleBmpExtensionProviderContext();
this.bmpActivator = new BmpActivator(context);
this.bmpActivator.start(ctx);
final BmpMessageRegistry messageRegistry = ctx.getBmpMessageRegistry();
this.dispatcher = new BmpDispatcherImpl(new NioEventLoopGroup(), new NioEventLoopGroup(), messageRegistry, (channel, sessionListenerFactory) -> BmpDispatcherImplTest.this.mockedSession);
}
Aggregations