SingleThreadJTAExecutor { public void cleanup() { afterCompletion.cancel(); } SingleThreadJTAExecutor();  SingleThreadJTAExecutor(BeforeCompletion beforeCompletion,
      AfterCompletion afterCompletion); void executeBeforeCompletion(TXState txState, Executor executor,
      CancelCriterion cancelCriterion); void executeAfterCompletionCommit(); void executeAfterCompletionRollback(); void cleanup(); boolean shouldDoCleanup();  }
@Test public void cleanupInvokesCancel() { singleThreadJTAExecutor.cleanup(); verify(afterCompletion, times(1)).cancel(); }