Add fix for #15, and template for generated tests