This whole thing appear twice in this PR alone. If this is the only way to test it, the helpers should be moved to a central place and be included in tests that need it somehow.