ConfigurationService { public String getJobShardingStrategyClass() { return jobNodeStorage.getJobNodeData(ConfigurationNode.JOB_SHARDING_STRATEGY_CLASS); } 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 assertGetJobShardingStrategyClass() { when(jobNodeStorage.getJobNodeData(ConfigurationNode.JOB_SHARDING_STRATEGY_CLASS)).thenReturn(JobShardingStrategy.class.getName()); assertThat(configService.getJobShardingStrategyClass(), is(JobShardingStrategy.class.getName())); verify(jobNodeStorage).getJobNodeData(ConfigurationNode.JOB_SHARDING_STRATEGY_CLASS); }