Add middleware test.