Changes middleware type test to be more robust