Added back in tests about middleware