Adding test coverage for new middleware