add test code for transaction