### Question:
StatisticManager { public void startup() { if (null != rdbRepository) { scheduler.start(); scheduler.register(new TaskResultStatisticJob(StatisticInterval.MINUTE, statisticData.get(StatisticInterval.MINUTE), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.HOUR, statisticData.get(StatisticInterval.HOUR), rdbRepository)); scheduler.register(new TaskResultStatisticJob(StatisticInterval.DAY, statisticData.get(StatisticInterval.DAY), rdbRepository)); scheduler.register(new JobRunningStatisticJob(registryCenter, rdbRepository)); scheduler.register(new RegisteredJobStatisticJob(configurationService, rdbRepository)); } } 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 assertStartupWhenRdbIsNotConfigured() throws NoSuchFieldException { ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", null); statisticManager.startup(); }
@Test public void assertStartupWhenRdbIsConfigured() throws NoSuchFieldException { ReflectionUtils.setFieldValue(statisticManager, "rdbRepository", rdbRepository); statisticManager.startup(); }