TSLRefreshConfiguration { @Bean public TaskScheduler tslRefreshTask() { final TaskScheduler scheduler = new ConcurrentTaskScheduler(); scheduler.schedule(refresher, new CronTrigger(loaderConfigurationProperties.getSchedulerCron())); return scheduler; }  @Bean TaskScheduler tslRefreshTask(); @Autowired void setRefresher(TSLRefresher refresher); @Autowired void setLoaderConfigurationProperties(TSLLoaderConfigurationProperties loaderConfigurationProperties);  }
@Test public void verifySchedulerCronIsQueriedFromPropertiesWhenCreatingTSLRefreshTask() throws Exception { when(properties.getSchedulerCron()).thenReturn(SCHEDULER_CRON); tslRefreshConfiguration.tslRefreshTask(); verify(properties, VerificationModeFactory.times(1)).getSchedulerCron(); }