BeforeCompletion { public synchronized void doOp(TXState txState) { try { txState.doBeforeCompletion(); } catch (SynchronizationCommitConflictException exception) { this.exception = exception; } catch (CacheClosedException exception) { this.exception = new TransactionDataNodeHasDepartedException(exception); } catch (RuntimeException exception) { this.exception = new TransactionException(exception); } finally { logger.debug("beforeCompletion notification completed"); finished = true; notifyAll(); } }  synchronized void doOp(TXState txState); synchronized void execute(CancelCriterion cancelCriterion); synchronized boolean isStarted(); synchronized boolean isFinished();  }
@Test public void doOpCallsDoBeforeCompletion() { beforeCompletion.doOp(txState); verify(txState).doBeforeCompletion(); }