Hack: use helper functions in tests for less copy-pasting Upstream-commit: 6e2e4cad735b24e913996f43b67c527713f98b67 Component: engine