test for optimistic locking fails with expected exception