Modularize test helpers