[test] Adding middleware test