final Domain theDomain = DomainFactory.getDomain("X");
final String theUserId = "test_user";
final Event theEvent = new Event() {};
EventRegistry theEventRegistry = EventRegistryFactory.getInstance().getEventRegistry();
theEventRegistry.registerUser(theDomain, theUserId, null);
DummyRemoteEventServlet theRemoteEventServiceServlet = new DummyRemoteEventServlet(theDomain, theEvent);
theRemoteEventServiceServlet.addEventCall();
final List<DomainEvent> theEvents = theEventRegistry.listen(getLongPollingListener(), theUserId);