### Question:
OnceSchedulingStrategy implements ISchedulingStrategy { @Override public void processException(final ISchedulerEntry entry, final Throwable e) throws SchedulingStrategyExecutionException { try { entry.cancel(); } catch (EntryStorageAccessException | EntryScheduleException ee) { throw new SchedulingStrategyExecutionException("Error occurred cancelling failed entry.", ee); } } OnceSchedulingStrategy(); @Override void init(final ISchedulerEntry entry, final IObject args); @Override void postProcess(final ISchedulerEntry entry); @Override void restore(final ISchedulerEntry entry); @Override void processException(final ISchedulerEntry entry, final Throwable e); @Override void notifyPaused(final ISchedulerEntry entry); @Override void notifyUnPaused(final ISchedulerEntry entry); @Override void processPausedExecution(final ISchedulerEntry entry);  }### Answer:
@Test public void Should_cancelEntryWhenErrorOccurs() throws Exception { ISchedulingStrategy strategy = new OnceSchedulingStrategy(); strategy.processException(entry, mock(Throwable.class)); verify(entry).cancel(); }