Add some tests for middleware->