Simplify file generation in tests