Improve transaction test