Improve tests for the FormFactory