@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());
}