assertEquals(1, ta.events.size());
SimpleFilter stf = new SimpleFilter();
Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put("appenders", "TestAppender");
ServiceRegistration sr = bundleContext.registerService(Filter.class.getName(), stf, props);
delay();
assertNotNull("Filter should have context set",stf.getContext());
assertTrue("Filter should be started", stf.isStarted());
ta.events.clear();
//A filter attached to an appender cannot influence isXXXEnabled call
assertTrue(bar.isDebugEnabled());
//No events should be logged as filter would have rejected that
bar.debug("Test");
assertTrue(ta.events.isEmpty());
//Now unregister and earlier asserts should work
sr.unregister();
delay();
ta.events.clear();
assertTrue(bar.isDebugEnabled());