Added transaction model and test.
Added pending transaction model and unit test.