Added unit tests for transactions