AbstractClientHandle extends LocalAbortable implements Identifiable<TransactionIdentifier> { final @Nullable Collection<T> ensureClosed() { @SuppressWarnings("unchecked") final State<T> local = STATE_UPDATER.getAndSet(this, null); return local == null ? null : local.values(); } AbstractClientHandle(final AbstractClientHistory parent, final TransactionIdentifier transactionId); @Override TransactionIdentifier getIdentifier(); boolean abort(); @Override final String toString();  }
@Test public void testEnsureClosed() { doHandleOperation(handle); final Collection<AbstractProxyTransaction> transactions = handle.ensureClosed(); Assert.assertNotNull(transactions); Assert.assertEquals(1, transactions.size()); }