ConfigurationService { public int getConcurrentDataProcessThreadCount() { return Integer.parseInt(jobNodeStorage.getJobNodeData(ConfigurationNode.CONCURRENT_DATA_PROCESS_THREAD_COUNT)); } 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(); String getScriptCommandLine();  }
@Test public void assertGetConcurrentDataProcessThreadCount() { when(jobNodeStorage.getJobNodeData(ConfigurationNode.CONCURRENT_DATA_PROCESS_THREAD_COUNT)).thenReturn("1"); assertThat(configService.getConcurrentDataProcessThreadCount(), is(1)); verify(jobNodeStorage).getJobNodeData(ConfigurationNode.CONCURRENT_DATA_PROCESS_THREAD_COUNT); }