StatisticManager { public static StatisticManager getInstance(final CoordinatorRegistryCenter regCenter, final TracingConfiguration tracingConfiguration) { if (null == instance) { synchronized (StatisticManager.class) { if (null == instance) { Map<StatisticInterval, TaskResultMetaData> statisticData = new HashMap<>(); statisticData.put(StatisticInterval.MINUTE, new TaskResultMetaData()); statisticData.put(StatisticInterval.HOUR, new TaskResultMetaData()); statisticData.put(StatisticInterval.DAY, new TaskResultMetaData()); instance = new StatisticManager(regCenter, tracingConfiguration, new StatisticsScheduler(), statisticData); init(); } } } return instance; } private  StatisticManager(final CoordinatorRegistryCenter registryCenter, final TracingConfiguration tracingConfiguration,
                             final StatisticsScheduler scheduler, final Map<StatisticInterval, TaskResultMetaData> statisticData); static StatisticManager getInstance(final CoordinatorRegistryCenter regCenter, final TracingConfiguration tracingConfiguration); void startup(); void shutdown(); void taskRunSuccessfully(); void taskRunFailed(); TaskResultStatistics getTaskResultStatisticsWeekly(); TaskResultStatistics getTaskResultStatisticsSinceOnline(); TaskResultStatistics findLatestTaskResultStatistics(final StatisticInterval statisticInterval); List<TaskResultStatistics> findTaskResultStatisticsDaily(); JobExecutionTypeStatistics getJobExecutionTypeStatistics(); List<TaskRunningStatistics> findTaskRunningStatisticsWeekly(); List<JobRunningStatistics> findJobRunningStatisticsWeekly(); List<JobRegisterStatistics> findJobRegisterStatisticsSinceOnline();  }
@Test public void assertGetInstance() { assertThat(statisticManager, is(StatisticManager.getInstance(regCenter, null))); }