NodeSettingsService nodeSettingsService = new NodeSettingsService(ImmutableSettings.EMPTY);
Settings settings = ImmutableSettings.builder()
.put(CrateSettings.STATS_ENABLED.settingName(), true).build();
StatsTables stats = new StatsTables(settings, nodeSettingsService);
stats.jobsLog.get().add(new JobContextLog(new JobContext(UUID.randomUUID(), "select 1", 1L), null));
stats.listener.onRefreshSettings(ImmutableSettings.builder()
.put(CrateSettings.STATS_ENABLED.settingName(), true)
.put(CrateSettings.STATS_JOBS_LOG_SIZE.settingName(), 200).build());