public void testFilter() throws Throwable
{
Kernel kernel = bootstrap();
KernelRegistry registry = kernel.getRegistry();
KernelEventManager eventManager = kernel.getEventManager();
TestEmitter emitter = new TestEmitter();
KernelRegistryEntry entry = makeEntry(emitter);
registry.registerEntry("Emitter", entry);
TestListener listener = new TestListener();
TestFilter filter = new TestFilter();
eventManager.registerListener("Emitter", listener, filter, null);
emitter.testFire("testtype", null);
filter.fireEvent = false;
emitter.testFire("testtype", null);
ArrayList expected = new ArrayList();
expected.add(EventTestCaseSupport.makeExpected(emitter, "testtype", 0, null, null));
EventTestCaseSupport.check(listener, expected);
expected.add(EventTestCaseSupport.makeExpected(emitter, "testtype", 1, null, null));
EventTestCaseSupport.check(filter, expected);