EventBusImpl bus = eventBus;
TestAwareConsumerQueueSupplier consumerQueueSupplier = new TestAwareConsumerQueueSupplier();
bus.setConsumerQueueSupplier(consumerQueueSupplier);
StatefulEventHandler handler1 = new StatefulEventHandler("con1");
EventFilter filter = new InfixFilterLanguageSupport().convert("xpath(\"//name\")=\"con1\"");
bus.registerSubscriber(filter, handler1);
TestAwareQueue handler1Q = consumerQueueSupplier.testAwareQueue;
StatefulEventHandler handler2 = new StatefulEventHandler("con2");
filter = new InfixFilterLanguageSupport().convert("xpath(\"//name\")=\"con1\"");
bus.registerSubscriber(filter, handler2);
TestAwareQueue handler2Q = consumerQueueSupplier.testAwareQueue;
StatefulEventHandler handler3 = new StatefulEventHandler("con3");
filter = new InfixFilterLanguageSupport().convert("xpath(\"//name\")=\"con3\"");
bus.registerSubscriber(filter, handler3);
bus.publish(new Event("con1", 1));
checkIfEventOfferedAndDispatched(handler1Q, handler1);
checkIfEventOfferedAndDispatched(handler2Q, handler2);