EmptyTransactionCommitCohort extends AbstractTransactionCommitCohort { @Override public ListenableFuture<Boolean> canCommit() { return TRUE_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 testCanCommit() throws Exception { final ListenableFuture<Boolean> canCommit = cohort.canCommit(); assertEquals(Boolean.TRUE, getWithTimeout(canCommit)); }