@Override @Before public void setUp() throws Exception { dc = new DebugCounterServiceImpl(); dc.registerModule(OFConnectionCounters.COUNTER_MODULE); auxId = OFAuxId.of(5); dpId = DatapathId.of(5); counters = new OFConnectionCounters(dc, dpId, auxId); }
@Before public void setUp() throws Exception { factory = OFFactories.getFactory(OFVersion.OF_13); switchId = DatapathId.of(1); timer = new HashedWheelTimer(); channel = EasyMock.createMock(Channel.class); IDebugCounterService debugCounterService = new DebugCounterServiceImpl(); debugCounterService.registerModule(OFConnectionCounters.COUNTER_MODULE); conn = new OFConnection(switchId, factory, channel, OFAuxId.MAIN, debugCounterService, timer); eventLoop = new TestEventLoop(); expect(channel.eventLoop()).andReturn(eventLoop).anyTimes(); }