JobFacade { public boolean misfireIfNecessary(final List<Integer> shardingItems) { return executionService.misfireIfNecessary(shardingItems); } JobFacade(final CoordinatorRegistryCenter coordinatorRegistryCenter, final JobConfiguration jobConfiguration, final List<ElasticJobListener> elasticJobListeners); String getJobName(); int getConcurrentDataProcessThreadCount(); String getScriptCommandLine(); void checkMaxTimeDiffSecondsTolerable(); void failoverIfNecessary(); void registerJobBegin(final JobExecutionMultipleShardingContext shardingContext); void registerJobCompleted(final JobExecutionMultipleShardingContext shardingContext); JobExecutionMultipleShardingContext getShardingContext(); boolean misfireIfNecessary(final List<Integer> shardingItems); void clearMisfire(final List<Integer> shardingItems); boolean isExecuteMisfired(final List<Integer> shardingItems); boolean isEligibleForJobRunning(); boolean isNeedSharding(); void updateOffset(final int item, final String offset); void cleanPreviousExecutionInfo(); void beforeJobExecuted(final JobExecutionMultipleShardingContext shardingContext); void afterJobExecuted(final JobExecutionMultipleShardingContext shardingContext);  }
@Test public void testMisfireIfNecessary() { when(executionService.misfireIfNecessary(Arrays.asList(0, 1))).thenReturn(true); assertThat(jobFacade.misfireIfNecessary(Arrays.asList(0, 1)), is(true)); }