chore(engine): refactor test to be deterministic