Queue<Event> queue = new ConcurrentLinkedQueue<Event>();
EventCollector eventCollector = new EventCollector();
eventCollector.setDefaultInterval(500);
eventCollector.getFilters().add(new StringContentFilter());
eventCollector.getHandlers().add(new ContentLengthHandler());
eventCollector.setEventsPerMessageCall(2);
eventCollector.setQueue(queue);
TaskExecutor executor = new SyncTaskExecutor();
eventCollector.setExecutor(executor);
MockService monitoringService = new MockService();