Updated Transaction.buy method for edge case handling
Finished my JUnit.
Fixed merge conflicts in TransactionTest.