}
@Test
public void testProcessEventsConcurrently_shouldProcessBothEvents() throws Exception {
manager.addImport(TestEvent.class.getName());
manager.add(new RuleBaseElementId(RuleBaseElementType.Rule, "concurrent test"), "when\n"
+ "TestEvent(value == \"0\")\n"
+ "then\n"
+ "example.doSomething(\"concurrent\");");
manager.add(new RuleBaseElementId(RuleBaseElementType.Rule, "concurrent test1"), "when\n"
+ "TestEvent(value == \"1\")\n"
+ "then\n"
+ "Thread.sleep(1000);");
Callable<Void> task = makeProcessEventTask(new TestEvent("1"));
Callable<Void> task2 = makeProcessEventTask(new TestEvent("0"));