Added basic middleware tests