### Question:
StatisticManager { public JobExecutionTypeStatistics getJobExecutionTypeStatistics() { int transientJobCnt = 0; int daemonJobCnt = 0; for (CloudJobConfiguration each : configurationService.loadAll()) { if (CloudJobExecutionType.TRANSIENT.equals(each.getJobExecutionType())) { transientJobCnt++; } else if (CloudJobExecutionType.DAEMON.equals(each.getJobExecutionType())) { daemonJobCnt++; } } return new JobExecutionTypeStatistics(transientJobCnt, daemonJobCnt); } private  StatisticManager(final CoordinatorRegistryCenter registryCenter, final Optional<JobEventRdbConfiguration> jobEventRdbConfiguration,
                             final StatisticsScheduler scheduler, final Map<StatisticInterval, TaskResultMetaData> statisticData); static StatisticManager getInstance(final CoordinatorRegistryCenter regCenter, final Optional<JobEventRdbConfiguration> jobEventRdbConfiguration); void startup(); void shutdown(); void taskRunSuccessfully(); void taskRunFailed(); TaskResultStatistics getTaskResultStatisticsWeekly(); TaskResultStatistics getTaskResultStatisticsSinceOnline(); TaskResultStatistics findLatestTaskResultStatistics(final StatisticInterval statisticInterval); List<TaskResultStatistics> findTaskResultStatisticsDaily(); JobTypeStatistics getJobTypeStatistics(); JobExecutionTypeStatistics getJobExecutionTypeStatistics(); List<TaskRunningStatistics> findTaskRunningStatisticsWeekly(); List<JobRunningStatistics> findJobRunningStatisticsWeekly(); List<JobRegisterStatistics> findJobRegisterStatisticsSinceOnline();  }### Answer:
@Test public void assertJobExecutionTypeStatistics() throws NoSuchFieldException { ReflectionUtils.setFieldValue(statisticManager, "configurationService", configurationService); Mockito.when(configurationService.loadAll()).thenReturn(Lists.newArrayList( CloudJobConfigurationBuilder.createCloudJobConfiguration("test_job_1", CloudJobExecutionType.DAEMON), CloudJobConfigurationBuilder.createCloudJobConfiguration("test_job_2", CloudJobExecutionType.TRANSIENT))); Assert.assertThat(statisticManager.getJobExecutionTypeStatistics().getDaemonJobCount(), Is.is(1)); Assert.assertThat(statisticManager.getJobExecutionTypeStatistics().getTransientJobCount(), Is.is(1)); Mockito.verify(configurationService, Mockito.times(2)).loadAll(); }