ConfigurationService { public String getCron() { return jobNodeStorage.getJobNodeDataDirectly(ConfigurationNode.CRON); } ConfigurationService(final CoordinatorRegistryCenter coordinatorRegistryCenter, final JobConfiguration jobConfiguration); void persistJobConfiguration(); int getShardingTotalCount(); Map<Integer, String> getShardingItemParameters(); String getJobParameter(); String getCron(); boolean isMonitorExecution(); int getProcessCountIntervalSeconds(); int getConcurrentDataProcessThreadCount(); int getFetchDataCount(); void checkMaxTimeDiffSecondsTolerable(); boolean isFailover(); boolean isMisfire(); String getJobShardingStrategyClass(); int getMonitorPort(); String getJobName(); boolean inSkipTime(Date now);  }
@Test public void assertGetCron() { when(jobNodeStorage.getJobNodeDataDirectly(ConfigurationNode.CRON)).thenReturn("0/1 * * * * ?"); assertThat(configService.getCron(), is("0/1 * * * * ?")); verify(jobNodeStorage).getJobNodeDataDirectly(ConfigurationNode.CRON); }