16 package org.openkilda.floodlight.command.flow;
18 import static org.easymock.EasyMock.expect;
19 import static org.easymock.EasyMock.replay;
31 import net.floodlightcontroller.core.IOFSwitch;
32 import net.floodlightcontroller.core.internal.IOFSwitchService;
33 import net.floodlightcontroller.core.module.FloodlightModuleContext;
34 import net.floodlightcontroller.threadpool.IThreadPoolService;
35 import org.easymock.EasyMock;
36 import org.junit.Before;
37 import org.projectfloodlight.openflow.types.DatapathId;
38 import org.projectfloodlight.openflow.types.U64;
41 private final String correlationIdTemplate = String.format(
43 private int testIndex = 0;
47 protected IOFSwitch
sourceSwitch = EasyMock.createMock(IOFSwitch.class);
48 protected final DatapathId
destSwitchId = DatapathId.of(0x00ff000002L);
50 protected IOFSwitch
destSwitch = EasyMock.createMock(IOFSwitch.class);
56 protected IOFSwitchService
switchService = EasyMock.createMock(IOFSwitchService.class);
58 protected IThreadPoolService
threadPoolService = EasyMock.createMock(IThreadPoolService.class);
61 public void setUp() throws Exception {
62 FloodlightModuleContext moduleContext =
new FloodlightModuleContext();
65 moduleContext.addService(IOFSwitchService.class,
switchService);
77 expect(
sourceSwitch.getLatency()).andReturn(U64.ZERO).anyTimes();
78 expect(
destSwitch.getLatency()).andReturn(U64.ZERO).anyTimes();
82 String flowId =
"junit-flow";
84 flowId, 1000,
false,
"unit test flow",
FlowVerificationService flowVerificationService
IThreadPoolService threadPoolService
KafkaMessageProducer kafkaProducerService
final DatapathId destSwitchId
final DatapathId sourceSwitchId
IOFSwitchService switchService
UniFlowVerificationRequest makeVerificationRequest()