Minor refactor/cleanup of tests Upstream-commit: 7fdc2e42d1d8eadf38976c3363b994040ad28fa5 Component: engine