functionality for atomic test_and_set
putting request result inside state
extra testcase to expose Baardskeerder's problem with empty transactions