theEventRegistry.registerUnlistenEvent(TEST_USER_ID, UnlistenEventListener.Scope.UNLISTEN, null);
//register first user to TEST_DOMAIN
theEventRegistry.registerUser(TEST_DOMAIN, TEST_USER_ID, null);
theEventRegistry.addEvent(TEST_DOMAIN, new DummyEvent());
assertTrue(theEventRegistry.isUserRegistered(TEST_USER_ID));
List<DomainEvent> theEvents = theEventRegistry.listen(getLongPollingListener(), TEST_USER_ID);
assertNotNull(theEvents);
assertEquals(1, theEvents.size());
assertFalse(theEvents.get(0).getEvent() instanceof UnlistenEvent);
assertTrue(theEventRegistry.isUserRegistered(TEST_USER_ID));
//register second user to TEST_DOMAIN_2
theEventRegistry.registerUser(TEST_DOMAIN_2, TEST_USER_ID_2, null);
theEventRegistry.addEvent(TEST_DOMAIN_2, new DummyEvent());
assertTrue(theEventRegistry.isUserRegistered(TEST_USER_ID));
theEvents = theEventRegistry.listen(getLongPollingListener(), TEST_USER_ID_2);
assertNotNull(theEvents);
assertEquals(1, theEvents.size());