MDL-52471 tests: simplify setup code