Added unit test for transaction with closed database.
Added documentation to the `inTransaction`-method regarding database instance.