Made test generator rule generic.