More test coverage for custom route middleware