UCCQLTester java code

package com.uc.cep.examples.cqltest;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import com.uc.cep.examples.ChannelHelper.InChannels;
import com.uc.cep.examples.ChannelHelper.OutChannels;
import com.uc.cep.examples.LocalBundleActivator;
import com.uc.cep.examples.MyEvent;
import com.uc.cep.examples.TestBase;

/**
* This class is an example of how you would implement CQL tests.<p>
* Wire this class into the EPN Spring context, calling the "run" method:
*
* <p><code>&lt;bean id="tester" class="com.uc.cep.examples.UCCQLTester" init-method="run"&gt;</code><p>
*
* Each CQL test is a method starting with "test", so you can implement any number
* of tests here as you see fit.
*
* @author Andrew Upton,  Upton Consulting GmbH 2017
*
*/
public class UCCQLTester extends TestBase
{
private static Logger LOGGER = Logger.getLogger(UCCQLTester.class);

public UCCQLTester()
{
LocalBundleActivator.setTester(this);
}

public void testSomething() throws Exception
{
MyEvent event = new MyEvent();

// configure the event to do something deterministic to exercise the CQL rules in the target CQL processor
// ...

// send the canonical event into the EPN
LocalBundleActivator.getChannelHelper().getEventChannel(InChannels.IN_CHANNEL_ONE).sendInsertEvent(event);

/* remember to add this verification code at the end of each test.
* It should be customised to the output channels you wish to inspect
*/
List<OutChannels> outChannelsToScan = new ArrayList<OutChannels>();
outChannelsToScan.add(OutChannels.OUT_CHANNEL_ONE);
checkListeners(outChannelsToScan);
}</div>
<div>
/*... Do more tests here */

}</div>