EmptyTransactionCommitCohort extends AbstractTransactionCommitCohort { @Override public ListenableFuture<Void> preCommit() { 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 testPreCommit() throws Exception { final ListenableFuture<Void> preCommit = cohort.preCommit(); assertNull(getWithTimeout(preCommit)); }