use of org.openkilda.wfm.topology.OutputCollectorMock in project open-kilda by telstra.
the class OFELinkBoltTest method before.
@Before
public void before() throws CmdLineException, ConfigurationException {
OFEventWFMTopology manager = new OFEventWFMTopology(AbstractStormTest.makeLaunchEnvironment());
config = manager.getConfig();
bolt = new OFELinkBolt(config);
context = Mockito.mock(TopologyContext.class);
Mockito.when(context.getComponentId(TASK_ID_BOLT)).thenReturn(COMPONENT_ID_SOURCE);
Mockito.when(context.getComponentOutputFields(COMPONENT_ID_SOURCE, STREAM_ID_INPUT)).thenReturn(KafkaMessage.FORMAT);
outputDelegate = Mockito.spy(new OutputCollectorMock());
OutputCollector output = new OutputCollector(outputDelegate);
bolt.prepare(stormConfig(), context, output);
bolt.initState(new InMemoryKeyValueState<>());
}
Aggregations