use of org.graylog.scheduler.clock.JobSchedulerClock in project graylog2-server by Graylog2.
the class EventDefinitionFacadeTest method setUp.
@Before
@SuppressForbidden("Using Executors.newSingleThreadExecutor() is okay in tests")
public void setUp() throws Exception {
objectMapper.registerSubtypes(AggregationEventProcessorConfig.class, PersistToStreamsStorageHandler.Config.class, TemplateFieldValueProvider.Config.class, AggregationEventProcessorConfigEntity.class);
stateService = mock(DBEventProcessorStateService.class);
jobDefinitionService = mock(DBJobDefinitionService.class);
jobTriggerService = mock(DBJobTriggerService.class);
jobSchedulerClock = mock(JobSchedulerClock.class);
eventDefinitionService = new DBEventDefinitionService(mongodb.mongoConnection(), mapperProvider, stateService, entityOwnershipService);
eventDefinitionHandler = new EventDefinitionHandler(eventDefinitionService, jobDefinitionService, jobTriggerService, jobSchedulerClock);
Set<PluginMetaData> pluginMetaData = new HashSet<>();
facade = new EventDefinitionFacade(objectMapper, eventDefinitionHandler, pluginMetaData, jobDefinitionService, eventDefinitionService, userService);
}
Aggregations