Added simple test for templae-generator and fixed define-field-pattern.