Implemented PerForeignKeyTemplatesTestTemplateFactoryTest. refs #474