Tests for the TransactionMiddleware