ConfigurationService { public String getJobName() { return jobNodeStorage.getJobConfiguration().getJobName(); } 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 assertGetJobName() { when(jobNodeStorage.getJobConfiguration()).thenReturn(jobConfig); assertThat(configService.getJobName(), is("testJob")); verify(jobNodeStorage).getJobConfiguration(); }