Fixed #19645 -- added TransactionMiddleware tests.