16 package org.openkilda.floodlight.command.flow;
18 import static org.easymock.EasyMock.anyObject;
19 import static org.easymock.EasyMock.capture;
20 import static org.easymock.EasyMock.eq;
21 import static org.easymock.EasyMock.expect;
22 import static org.easymock.EasyMock.expectLastCall;
23 import static org.easymock.EasyMock.newCapture;
24 import static org.easymock.EasyMock.replay;
25 import static org.easymock.EasyMock.reset;
26 import static org.easymock.EasyMock.verify;
36 import org.easymock.Capture;
37 import org.easymock.CaptureType;
38 import org.easymock.EasyMock;
39 import org.junit.After;
40 import org.junit.Assert;
41 import org.junit.Before;
42 import org.junit.Test;
43 import org.projectfloodlight.openflow.protocol.ver12.OFFactoryVer12;
44 import org.projectfloodlight.openflow.protocol.ver13.OFFactoryVer13;
46 import java.util.concurrent.ScheduledExecutorService;
51 public void setUp() throws Exception {
53 ScheduledExecutorService scheduler = EasyMock.createMock(ScheduledExecutorService.class);
57 expect(
destSwitch.getOFFactory()).andReturn(
new OFFactoryVer13()).anyTimes();
69 expect(
destSwitch.getOFFactory()).andReturn(
new OFFactoryVer12()).anyTimes();
81 public void run() throws Exception {
86 expectLastCall().once();
101 Assert.assertFalse(
"False positive VerificationData match", subject.
packetIn(
destSwitch, shouldSkip));
104 expectLastCall().once();
108 Assert.assertTrue(
"False negative VerificationData match", subject.
packetIn(
destSwitch, shouldMatch));
119 expectLastCall().once();
122 Capture<InfoMessage> outputCapture = newCapture(CaptureType.LAST);
125 expectLastCall().once();
void unsubscribe(VerificationListenCommand handler)
FlowVerificationService flowVerificationService
boolean packetIn(IOFSwitch sw, VerificationData payload)
static VerificationData of(DecodedJWT token)
IThreadPoolService threadPoolService
KafkaMessageProducer kafkaProducerService
void subscribe(VerificationListenCommand handler)
void postMessage(final String topic, final Message message)
UniFlowVerificationRequest makeVerificationRequest()