Improve API version-middleware test Upstream-commit: fbed4eb8c72f56437f2a451f9cd9405814882e2a Component: engine