Added tests to cover transaction consistency across threads.