Middleware testing - Ready for review