Middleware testing (WIP)