Update leak tests to use template.