Transaction extends AtomicOperation implements
        AtomicSupport { @Override public AtomicOperation startAtomicOperation() { checkState(); AtomicOperation operation = AtomicOperation.start(this); operation.lockService = LockService.noOp(); operation.rangeLockService = RangeLockService.noOp(); return operation; } private  Transaction(Engine destination); private  Transaction(Engine destination, ByteBuffer bytes); static void recover(Engine destination, String file); static Transaction start(Engine engine); @Override void abort(); @Override void accept(Write write); @Override void accept(Write write, boolean sync); @Override @Restricted void addVersionChangeListener(Token token,
            VersionChangeListener listener); @Override Map<Long, String> auditUnsafe(long record); @Override Map<Long, String> auditUnsafe(String key, long record); @Override Map<String, Set<TObject>> browseUnsafe(long record); @Override Map<TObject, Set<Long>> browseUnsafe(String key); @Override Map<Long, Set<TObject>> chronologizeUnsafe(String key, long record,
            long start, long end); @Override Map<Long, Set<TObject>> doExploreUnsafe(String key,
            Operator operator, TObject... values); @Override Set<TObject> gatherUnsafe(String key, long record); @Override @Restricted void notifyVersionChange(Token token); @Override void onVersionChange(Token token); @Override @Restricted void removeVersionChangeListener(Token token,
            VersionChangeListener listener); @Override Set<TObject> selectUnsafe(String key, long record); @Override AtomicOperation startAtomicOperation(); @Override void sync(); @Override String toString(); @Override boolean verifyUnsafe(String key, TObject value, long record);  }
@Test(expected = TransactionStateException.class) public void testAtomicOperationFromTransactionFailsIfVersionChangesWithCommit() { Transaction txn = (Transaction) this.store; AtomicOperation operation = txn.startAtomicOperation(); operation.select("foo", 1); Engine engine = (Engine) this.destination; operation.commit(); engine.add("foo", Convert.javaToThrift("bar"), 1); Assert.assertFalse(txn.commit()); }