assertEquals(1, theEventRegistry.listen(getLongPollingListener(), TEST_USER_ID).size());
}
@Test
public void testRemoveEventFilter_2() {
final EventRegistry theEventRegistry = EventRegistryFactory.getInstance().getEventRegistry();
theEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, null);
theEventRegistry.addEvent(TEST_DOMAIN, new EmptyEvent());
assertEquals(1, theEventRegistry.listen(getLongPollingListener(), TEST_USER_ID).size());
assertNull(myEventExecutorService.getEventFilter(TEST_DOMAIN));
final EmptyEventFilter theEventFilter = new EmptyEventFilter(0);
myEventExecutorService.setEventFilter(TEST_DOMAIN, new EmptyEventFilter(0));
assertNotNull(myEventExecutorService.getEventFilter(TEST_DOMAIN));
assertEquals(theEventFilter, myEventExecutorService.getEventFilter(TEST_DOMAIN));
theEventRegistry.addEvent(TEST_DOMAIN, new EmptyEvent());
assertEquals(0, theEventRegistry.listen(getLongPollingListener(), TEST_USER_ID).size());
myEventExecutorService.setEventFilter(TEST_DOMAIN, null);
theEventRegistry.addEvent(TEST_DOMAIN, new EmptyEvent());
assertEquals(1, theEventRegistry.listen(getLongPollingListener(), TEST_USER_ID).size());
}