EmptyTransactionCommitCohort extends AbstractTransactionCommitCohort { @Override public ListenableFuture<Void> abort() { complete(); return VOID_FUTURE; } EmptyTransactionCommitCohort(final AbstractClientHistory parent, final TransactionIdentifier txId); @Override ListenableFuture<Boolean> canCommit(); @Override ListenableFuture<Void> preCommit(); @Override ListenableFuture<Void> abort(); @Override ListenableFuture<Void> commit();  }
@Test public void testAbort() throws Exception { final ListenableFuture<Void> abort = cohort.abort(); verify(history).onTransactionComplete(TRANSACTION_ID); assertNull(getWithTimeout(abort)); }