@Test
public void testSourceFilteredListener() {
StaticApplicationContext ctx = new StaticApplicationContext();
MyApplicationListener delegate = new MyApplicationListener();
MyEventSource source = new MyEventSource();
MyEvent event = new MyEvent(source);
ctx.addApplicationListener(new SourceFilteringListener(source, delegate));
ctx.refresh();
ctx.publishEvent(event);
assertSame("Mismatched delegate event", event, delegate.getLastEvent());