Adding middleware test